本文整理汇总了C#中System.ValueType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ValueType.ToString方法的具体用法?C# ValueType.ToString怎么用?C# ValueType.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ValueType
的用法示例。
在下文中一共展示了ValueType.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBusinessObject
public IBeheerContextEntity GetBusinessObject(string tableName, string kolomName, ValueType value)
{
string qry = @"select id, {0} from {1} where {0} = {2}";
qry = string.Format(CultureInfo.InvariantCulture, qry, kolomName, tableName, value);
return GetBusinessObject(qry,
new BeheerContextEntity
{
DataKeyValue = value.ToString(),
DataKeyName = kolomName,
Tablename = tableName
});
}
示例2: DefaultFindFullDocumentKeyFromValueTypeIdentifier
///<summary>
/// Find the full document name assuming that we are using the standard conventions
/// for generating a document key
///</summary>
///<returns></returns>
public string DefaultFindFullDocumentKeyFromValueTypeIdentifier(ValueType id, Type type)
{
string idPart;
var converter = IdentityTypeConvertors.FirstOrDefault(x => x.CanConvertFrom(id.GetType()));
if (converter != null)
{
idPart = converter.ConvertFrom(id);
}
else
{
idPart = id.ToString();
}
return GetTypeTagName(type) + IdentityPartsSeparator + idPart;
}
示例3: SetParameter
/// <summary>
///
/// </summary>
/// <param name="paramName"></param>
/// <param name="value"></param>
private static void SetParameter(String paramName, ValueType value)
{
if (_RemoteConfigurationEnable)
{
_RemoteConfig.AppSettings.Settings[paramName].Value = value.ToString();
_RemoteConfig.Save();
ConfigurationManager.RefreshSection("appSettings");
}
else
{
_LocalConfig.AppSettings.Settings[paramName].Value = value.ToString();
_LocalConfig.Save(ConfigurationSaveMode.Modified, false);
ConfigurationManager.RefreshSection("appSettings");
}
return;
}
示例4: RateHeaderCalc
string RateHeaderCalc(ValueType e)
{
string s = e.ToString();
switch ((RateIntervalCalc)e)
{
case RateIntervalCalc.OverallTime:
s += " sec";
break;
}
return s;
}
示例5: RateHeader
string RateHeader(ValueType e)
{
string s = e.ToString();
switch ((RateInterval)e)
{
case RateInterval.GateWidth:
s += " 1e-7 s";
break;
case RateInterval.OverallTime:
s += " sec";
break;
}
return s;
}
示例6: CoincidenceHeader
string CoincidenceHeader(ValueType e)
{
string s = e.ToString();
switch ((CoincidenceMatrix)e)
{
case CoincidenceMatrix.LongDelay:
case CoincidenceMatrix.PreDelay:
case CoincidenceMatrix.GateWidth:
s += " uSec";
break;
}
return s;
}
示例7: DetectorCalibrationHeader
string DetectorCalibrationHeader(ValueType e)
{
string s = e.ToString();
switch ((DetectorCalibration)e)
{
case DetectorCalibration.LongDelay:
case DetectorCalibration.Predelay:
case DetectorCalibration.GateLength:
case DetectorCalibration.DieAwayTime:
case DetectorCalibration.DTCoeffA:
s += " µSec";
break;
case DetectorCalibration.DTCoeffT:
case DetectorCalibration.DTCoeffC:
s += " nSec";
break;
case DetectorCalibration.DTCoeffB:
s += " pSec";
break;
}
return s;
}
示例8: NotificationCallback
private void NotificationCallback(ValueType rawNetInterface, string source, int code, int size, IntPtr buffer)
{
if(InvokeRequired)
{
Invoke(new Action(( ) => NotificationCallback(rawNetInterface, source, code, size, buffer)));
}
else
{
try
{
var netInterface = (Guid)rawNetInterface;
var message = new StringBuilder( );
message.Append("Notification received from ");
message.Append(source);
message.Append(" on interface \"");
var interfaces = cbInterfaces.DataSource as List<WlanInterface>;
if (interfaces == null)
{
message.Append(rawNetInterface.ToString( ));
}
else
{
var iface = interfaces.FirstOrDefault(x => ((Guid)x.InterfaceGuid).Equals(rawNetInterface));
if (iface != null)
{
message.Append(iface.Description);
}
else
{
message.Append(rawNetInterface.ToString( ));
}
}
message.Append("\" with code ");
message.Append(code);
message.Append(" and ");
message.Append(size);
message.Append(" bytes at ");
message.AppendFormat("0x{0:x}", buffer.ToInt64( ));
message.Append(".");
MessageBox.Show(message.ToString( ), "WLAN Change Notification", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
catch(Exception ex)
{
UiError(ex);
}
}
}
示例9: ReportDuplicateValue
public static void ReportDuplicateValue(ValueType type, string value)
{
LogWarning(string.Format(CultureInfo.CurrentCulture, "Ignoring duplicate {0} value - ", type.ToString()));
Console.WriteLine("{0}", value);
}
示例10: InsertValueAt
public void InsertValueAt(ValueType newValue, int index)
{
InsertDomChildAt(NodeType.Element, "", "Value", index, newValue.ToString());
}
示例11: AddValue
public void AddValue(ValueType newValue)
{
AppendDomChild(NodeType.Element, "", "Value", newValue.ToString());
}
示例12: UpgradeForgingAttribute
protected override void UpgradeForgingAttribute(AttributeCode attribute, ValueType value)
{
if (CurrentLevel < DataConstraint.EquipmentMaxLevel && !attribute.Equals(AttributeCode.Null) && value != null)
{
float f = Convert.ToSingle(value.ToString());
if (f > 0)
{
ForgingAttributes[CurrentLevel + 1] = new KeyValuePair<AttributeCode, float>(attribute, f);
}
}
}
示例13: UpdateForgingAttribute
protected override void UpdateForgingAttribute(int level, AttributeCode attribute, ValueType value)
{
if (ForgingAttributes.ContainsKey(level) && !attribute.Equals(AttributeCode.Null) &&
value != null)
{
float f = Convert.ToSingle(value.ToString());
if (f > 0)
{
ForgingAttributes[level] = new KeyValuePair<AttributeCode, float>(attribute, f);
}
}
}
示例14: InsertValue2At
public void InsertValue2At(ValueType newValue, int index)
{
if( newValue.IsNull() == false )
InsertDomChildAt(NodeType.Element, "", "Value", index, newValue.ToString());
}
示例15: AddValue2
public XmlNode AddValue2(ValueType newValue)
{
if( newValue.IsNull() == false )
return AppendDomChild(NodeType.Element, "", "Value", newValue.ToString());
return null;
}