Class VariableType
Describes the type of a variable. When an object of this type is in-scope,
it forces the ExpressionCompiler to treat the object as that
specific type and not as dynamic
. This is particularly important if
you wish to use extension methods with that variable, because extension methods
cannot be bound to dynamically-typed objects.
Inheritance
Implements
Inherited Members
Namespace: ZptSharp.Expressions.CSharpExpressions
Assembly: ZptSharp.CSharpExpressions.dll
Syntax
public sealed class VariableType : IEquatable<VariableType>
Constructors
| Improve this Doc View SourceVariableType(String, String)
Initializes a new instance of VariableType.
Declaration
public VariableType(string variableName, string type)
Parameters
Type | Name | Description |
---|---|---|
System.String | variableName | |
System.String | type |
Properties
| Improve this Doc View SourceType
Gets the type for the variable.
Declaration
public string Type { get; }
Property Value
Type | Description |
---|---|
System.String | The type. |
VariableName
Gets the name of the variable which is to be treated as a specific type.
Declaration
public string VariableName { get; }
Property Value
Type | Description |
---|---|
System.String | The variable name |
Methods
| Improve this Doc View SourceEquals(Object)
Gets a value which indicates if the current instance is equal to the specified System.Object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | An object. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
Equals(VariableType)
Gets a value which indicates if the current instance is equal to the specified VariableType.
Declaration
public bool Equals(VariableType other)
Parameters
Type | Name | Description |
---|---|---|
VariableType | other | A C# variable-type designation. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetHashCode()
Gets a hash code for the current instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code. |