Conversion Struct

Definition

Summarizes whether a conversion is allowed, and if so, which kind of conversion (and in some cases, the associated symbol).

public value class Conversion : IEquatable<Microsoft::CodeAnalysis::CSharp::Conversion>
public struct Conversion : IEquatable<Microsoft.CodeAnalysis.CSharp.Conversion>
public readonly struct Conversion : IEquatable<Microsoft.CodeAnalysis.CSharp.Conversion>
type Conversion = struct
Public Structure Conversion
Implements IEquatable(Of Conversion)
Inheritance
Conversion
Implements

Properties

ConstrainedToType

Type parameter which runtime type will be used to resolve virtual invocation of the MethodSymbol, if any. Null if MethodSymbol is resolved statically, or is null.

Exists

Returns true if the conversion exists, either as an implicit or explicit conversion.

IsAnonymousFunction

Returns true if the conversion is an implicit anonymous function conversion.

IsBoxing

Returns true if the conversion is an implicit boxing conversion.

IsCollectionExpression

Returns true if the conversion is an implicit collection expression conversion.

IsCollectionLiteral

Returns true if the conversion is an implicit collection literal expression conversion.

IsConditionalExpression

Returns true if the conversion is an implicit conditional expression conversion.

IsConstantExpression

Returns true if the conversion is an implicit constant expression conversion.

IsDefaultLiteral

Returns true if the conversion is an implicit default literal conversion.

IsDynamic

Returns true if the conversion is an implicit dynamic conversion.

IsEnumeration

Returns true if the conversion is an implicit enumeration conversion or explicit enumeration conversion.

IsExplicit

Returns true if the conversion is explicit.

IsIdentity

Returns true if the conversion is an identity conversion.

IsImplicit

Returns true if the conversion is implicit.

IsInlineArray

Returns true if the conversion is an inline array conversion.

IsInterpolatedString

Returns true if the conversion is an interpolated string conversion.

IsInterpolatedStringHandler

Returns true if the conversion is an interpolated string builder conversion.

IsIntPtr

Returns true if the conversion is a conversion to or from IntPtr or UIntPtr.

IsMethodGroup

Returns true if the conversion is an implicit method group conversion.

IsNullable

Returns true if the conversion is an implicit nullable conversion or explicit nullable conversion.

IsNullLiteral

Returns true if the conversion is an implicit null literal conversion.

IsNumeric

Returns true if the conversion is an implicit numeric conversion or explicit numeric conversion.

IsObjectCreation

Returns true if the conversion is an implicit object creation expression conversion.

IsPointer

Returns true if the conversion is a pointer conversion

IsReference

Returns true if the conversion is an implicit reference conversion or explicit reference conversion.

IsStackAlloc

Returns true if the conversion is a stackalloc conversion.

IsSwitchExpression

Returns true if the conversion is an implicit switch expression conversion.

IsThrow

Returns true if the conversion is an implicit throw conversion.

IsTupleConversion

Returns true if the conversion is an implicit tuple conversion or explicit tuple conversion.

IsTupleLiteralConversion

Returns true if the conversion is an implicit tuple literal conversion or explicit tuple literal conversion.

IsUnboxing

Returns true if the conversion is an explicit unboxing conversion.

IsUserDefined

Returns true if the conversion is an implicit user-defined conversion or explicit user-defined conversion.

MethodSymbol

Returns the method used to create the delegate for a method group conversion if IsMethodGroup is true or the method used to perform the conversion for a user-defined conversion if IsUserDefined is true. Otherwise, returns null.

Methods

Equals(Conversion)

Determines whether the specified Conversion object is equal to the current Conversion object.

Equals(Object)

Determines whether the specified Conversion object is equal to the current Conversion object.

GetHashCode()

Returns a hash code for the current Conversion object.

ToCommonConversion()

Creates a CommonConversion from this C# conversion.

ToString()

Returns a string that represents the Microsoft.CodeAnalysis.CSharp.Conversion.Kind of the conversion.

Operators

Equality(Conversion, Conversion)

Returns true if the specified Conversion objects are equal and false otherwise.

Inequality(Conversion, Conversion)

Returns false if the specified Conversion objects are equal and true otherwise.

Applies to