Show / Hide Table of Contents

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
System.Object
VariableType
Implements
System.IEquatable<VariableType>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp.Expressions.CSharpExpressions
Assembly: ZptSharp.CSharpExpressions.dll
Syntax
public sealed class VariableType : IEquatable<VariableType>

Constructors

| Improve this Doc View Source

VariableType(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 Source

Type

Gets the type for the variable.

Declaration
public string Type { get; }
Property Value
Type Description
System.String

The type.

| Improve this Doc View Source

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 Source

Equals(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

true if the instances are equal; false otherwise.

Overrides
System.Object.Equals(System.Object)
| Improve this Doc View Source

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

true if the instances are equal; false otherwise.

| Improve this Doc View Source

GetHashCode()

Gets a hash code for the current instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

The hash code.

Overrides
System.Object.GetHashCode()

Implements

System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX