本文整理汇总了C#中VariableType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# VariableType.ToString方法的具体用法?C# VariableType.ToString怎么用?C# VariableType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VariableType
的用法示例。
在下文中一共展示了VariableType.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetVariableTypeName
/// <summary>
/// Get the string value for a corresponding VariableType value.
/// </summary>
/// <param name="value">The variable type to convert</param>
/// <returns>String representation</returns>
public static string GetVariableTypeName(VariableType value)
{
switch (value)
{
case VariableType.Numeric:
return "numeric";
case VariableType.String:
return "string";
case VariableType.Version:
return "version";
default:
throw new ArgumentOutOfRangeException("value", string.Format("Variable Type: '{0}' is not defined.", value.ToString()));
};
}
示例2: getFsmVariableType
internal string getFsmVariableType(VariableType _type)
{
return _type.ToString();
}
示例3: GetVariableTypeFriendlyString
/*! \cond PRIVATE */
public static string GetVariableTypeFriendlyString(VariableType varType)
{
var vType = varType.ToString();
vType = vType.Substring(1);
vType = vType.Substring(0, 1).ToUpper() + vType.Substring(1);
return vType;
}
示例4: VariableInfo
public VariableInfo(AlertVariable var, string value, string languageId, VariableType type)
: this(var.isRelObject, var.name, value)
{
this.languageId = languageId;
this.type = type.ToString();
if (var.isLink)
this._isLink = "1";
if (var.external)
this._external = "1";
this._disableNoMenu = var.disableNoMenu ? "1" : "0";
}
示例5: ThrowTypeIncorrectException
public static void ThrowTypeIncorrectException(StringParser parser, int position, VariableType type)
{
throw new ScriptException(parser, position, $"The variable must be convertible to one of the following types: {type.ToString()}");
}