本文整理汇总了C#中System.CodeDom.CodeVariableDeclarationStatement.Reference方法的典型用法代码示例。如果您正苦于以下问题:C# CodeVariableDeclarationStatement.Reference方法的具体用法?C# CodeVariableDeclarationStatement.Reference怎么用?C# CodeVariableDeclarationStatement.Reference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.CodeDom.CodeVariableDeclarationStatement
的用法示例。
在下文中一共展示了CodeVariableDeclarationStatement.Reference方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
/// <summary>
/// Creates an addition expression.
/// </summary>
/// <param name="left">The left operand.</param>
/// <param name="right">The right operand.</param>
/// <returns>An addition expression.</returns>
public static CodeBinaryOperatorExpression Add(this CodeExpression left, CodeVariableDeclarationStatement right)
{
return new CodeBinaryOperatorExpression(left, CodeBinaryOperatorType.Add, right.Reference());
}
示例2: IdentityInequality
/// <summary>
/// Creates an identity-inequality expression.
/// </summary>
/// <param name="left">The left operand.</param>
/// <param name="right">The right operand.</param>
/// <returns>A identity-inequality expression.</returns>
public static CodeBinaryOperatorExpression IdentityInequality(this CodeExpression left, CodeVariableDeclarationStatement right)
{
return new CodeBinaryOperatorExpression(left, CodeBinaryOperatorType.IdentityInequality, right.Reference());
}
示例3: CreateDelegate
/// <summary>
/// Creates a delegate-create expression.
/// </summary>
/// <param name="type">The type of the delegate.</param>
/// <param name="variable">The object on which the delegate is created.</param>
/// <param name="methodName">The name of the method that gets invoked when the delegate is invoked.</param>
/// <returns>A delegate-create expression.</returns>
public static CodeDelegateCreateExpression CreateDelegate(this CodeTypeReference type, CodeVariableDeclarationStatement variable, string methodName)
{
return type.CreateDelegate(variable.Reference(), methodName);
}
示例4: GreaterThanOrEqual
/// <summary>
/// Creates a greater-than-or-equal expression.
/// </summary>
/// <param name="left">The left operand.</param>
/// <param name="right">The right operand.</param>
/// <returns>A greater-than-or-equal expression.</returns>
public static CodeBinaryOperatorExpression GreaterThanOrEqual(this CodeExpression left, CodeVariableDeclarationStatement right)
{
return new CodeBinaryOperatorExpression(left, CodeBinaryOperatorType.GreaterThanOrEqual, right.Reference());
}
示例5: Assign
/// <summary>
/// Creates an assignment statement.
/// </summary>
/// <param name="left">The left operand.</param>
/// <param name="right">The right operand.</param>
/// <returns>An assignment statement.</returns>
public static CodeAssignStatement Assign(this CodeExpression left, CodeVariableDeclarationStatement right)
{
return left.Assign(right.Reference());
}