Struct AdSize
The size of a banner ad.
Inherited Members
Namespace: AppstockSDK.Api
Assembly: Appstock.Core.dll
Syntax
public readonly struct AdSize : IEquatable<AdSize>, IFormattable
Constructors
AdSize(int, int)
Creates a new AdSize.
Declaration
public AdSize(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
int | width | The width of the ad in density-independent pixels. |
int | height | The height of the ad in density-independent pixels. |
Fields
Banner
Gets a standard banner ad size.
Declaration
public static readonly AdSize Banner
Field Value
Type | Description |
---|---|
AdSize | Interactive Advertising Bureau (IAB) banner ad size (320x50 density-independent pixels). |
Height
Gets the height.
Declaration
public readonly int Height
Field Value
Type | Description |
---|---|
int | The height of the ad in density-independent pixels. |
IABBanner
Gets a standard full banner ad size.
Declaration
public static readonly AdSize IABBanner
Field Value
Type | Description |
---|---|
AdSize | Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels). |
Leaderboard
Gets a standard leaderboard ad size.
Declaration
public static readonly AdSize Leaderboard
Field Value
Type | Description |
---|---|
AdSize | Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels). |
MediumRectangle
Gets a standard medium rectangle ad size.
Declaration
public static readonly AdSize MediumRectangle
Field Value
Type | Description |
---|---|
AdSize | Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent pixels). |
Width
Gets the width.
Declaration
public readonly int Width
Field Value
Type | Description |
---|---|
int | The width of the ad in density-independent pixels. |
Methods
Equals(AdSize)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(AdSize other)
Parameters
Type | Name | Description |
---|---|---|
AdSize | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
ToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
ToString(string?, IFormatProvider?)
Formats the value of the current instance using the specified format.
Declaration
public string ToString(string? format, IFormatProvider? formatProvider)
Parameters
Type | Name | Description |
---|---|---|
string | format | The format to use. |
IFormatProvider | formatProvider | The provider to use to format the value. |
Returns
Type | Description |
---|---|
string | The value of the current instance in the specified format. |
Operators
implicit operator Vector2Int(AdSize)
Defines an implicit conversion of AdSize to a Vector2Int.
Declaration
public static implicit operator Vector2Int(AdSize size)
Parameters
Type | Name | Description |
---|---|---|
AdSize | size | The AdSize to convert. |
Returns
Type | Description |
---|---|
Vector2Int | The converted Vector2Int. |
implicit operator AdSize(Vector2Int)
Defines an implicit conversion of Vector2Int to a AdSize.
Declaration
public static implicit operator AdSize(Vector2Int size)
Parameters
Type | Name | Description |
---|---|---|
Vector2Int | size | The Vector2Int to convert. |
Returns
Type | Description |
---|---|
AdSize | The converted AdSize. |