当前位置: 首页>>代码示例>>C#>>正文


C# SByte.ToString方法代码示例

本文整理汇总了C#中System.SByte.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# SByte.ToString方法的具体用法?C# SByte.ToString怎么用?C# SByte.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.SByte的用法示例。


在下文中一共展示了SByte.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OSSByteToString

 public static unsafe string OSSByteToString(SByte n, string s, CultureInfo ci)
 {
     if (Utilities.IsWindows)
     {
         NumberFormatInfo nfi = NumberFormatInfoFromLCID(LCIDFromCultureInfo(ci));
         return n.ToString(s, nfi);
     }
     else
     {
         return OSNumberToStringMac(new IntPtr((void*)&n), s, ci, CFNumberType.kCFNumberSInt8Type, n);
     }
 }
开发者ID:CheneyWu,项目名称:coreclr,代码行数:12,代码来源:GlobLocHelper.cs

示例2: ToMonoBigInteger

 public static Mono.Math.BigInteger ToMonoBigInteger(SByte value)
 {
     return Mono.Math.BigInteger.Parse(value.ToString("#"));
 }
开发者ID:bluelovers,项目名称:phprpc,代码行数:4,代码来源:PHPConvert.cs

示例3: ToBigInteger

 public static BigInteger ToBigInteger(SByte value)
 {
     return BigInteger.Parse(value.ToString("#"));
 }
开发者ID:bluelovers,项目名称:phprpc,代码行数:4,代码来源:PHPConvert.cs

示例4: ToSqlString

 /// <summary>
 /// Converts the value of the specified 8-bit signed integer to its equivalent SqlString representation.
 /// </summary>
 /// <param name="value">An 8-bit signed integer.</param>
 /// <returns>The SqlString equivalent of the 8-bit signed integer value.</returns>
 
 public static SqlString ToSqlString(SByte value) { return value.ToString(); }
开发者ID:mstaessen,项目名称:fluorinefx,代码行数:7,代码来源:Convert.cs

示例5: ToSqlString

		public static SqlString ToSqlString(SByte           p) { return p.ToString();                                                                     }
开发者ID:titolarz,项目名称:bltoolkit,代码行数:1,代码来源:Convert.generated.cs

示例6: ToSqlChars

		// Nullable Types.

        /// <summary>
        /// Converts the value of the specified nullable 8-bit signed integer to its equivalent SqlChars representation.
        /// </summary>
        /// <param name="value">A nullable 8-bit signed integer.</param>
        /// <returns>The equivalent SqlChars.</returns>
        
        public static SqlChars ToSqlChars(SByte? value) { return value.HasValue ? new SqlChars(value.ToString().ToCharArray()) : SqlChars.Null; }
开发者ID:mstaessen,项目名称:fluorinefx,代码行数:9,代码来源:Convert.cs

示例7: ToString

		public static string ToString(SByte value)
		{
			return value.ToString(CultureInfo.InvariantCulture);
		}
开发者ID:GirlD,项目名称:mono,代码行数:4,代码来源:XmlConvert.cs

示例8: ToSqlChars

		public static SqlChars ToSqlChars(SByte? p)          { return p.HasValue? new SqlChars(p.ToString().ToCharArray()): SqlChars.Null; }
开发者ID:MajidSafari,项目名称:bltoolkit,代码行数:1,代码来源:Convert.cs

示例9: ToString

		public static String ToString(SByte? p)          { return p.ToString(); }
开发者ID:epdumitru,项目名称:mysqlib,代码行数:1,代码来源:Convert.cs

示例10: CheckSByte

 public void CheckSByte(SByte value, string format)
 {
     var parsed = Format.Parse(format);
     var formatter = new StringFormatter(pool);
     formatter.Append(value, parsed);
     var result = formatter.ToString();
     var clrResult = value.ToString(format, CultureInfo.InvariantCulture);
     Assert.Equal(clrResult, result);
 }
开发者ID:geoffkizer,项目名称:corefxlab,代码行数:9,代码来源:NumberFormattingTests.Generated.cs

示例11: ToSqlString

		public static SqlString ToSqlString(SByte? p)          { return p.HasValue? p.ToString(): SqlString.Null; }
开发者ID:epdumitru,项目名称:mysqlib,代码行数:1,代码来源:Convert.cs

示例12: TestToString

 public Boolean TestToString(SByte testSubject) {
 strLoc = "3498d";
 String b1 = "";
 String b2 = "";
 Boolean pass = false;
 Boolean excthrown = false;
 Object exc1 = null;
 Object exc2 = null;
 try {
 b1 = testSubject.ToString();
 pass = true;
 excthrown = false;
 } catch (Exception exc) {
 exc1 = exc;
 pass = false;
 excthrown = true;
 }
 try {
 b2 = Convert.ToString(testSubject);
 pass = pass & true;
 excthrown = false;
 } catch (Exception exc) {
 exc2 = exc;
 pass = false;
 excthrown = excthrown & true;
 }
 if(excthrown)
   if(exc1.GetType() == exc2.GetType())
     return true;
   else
     return false;
 else if(pass && b1.Equals(b2))
   return true;
 else
   return false;
 }	
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:36,代码来源:co5725iconvertible_sbyte.cs

示例13: PosTest12

 public bool PosTest12()
 {
     bool retVal = true;
     string ActualResult;
     object ObjA;
     TestLibrary.TestFramework.BeginScenario("PosTest12:Concat an object of SByte");
     try
     {
         ObjA = new SByte();
         ActualResult = string.Concat(ObjA);
         if (ActualResult != ObjA.ToString())
         {
             TestLibrary.TestFramework.LogError("023", "Concat an object of SByte ExpectResult is equel" + ObjA.ToString()+ ",ActualResult is (" + ActualResult + ")");
             retVal = false;
         }
     }
     catch (Exception e)
     {
         TestLibrary.TestFramework.LogError("024", "Unexpected exception" + e);
         retVal = false;
     }
     return retVal;
 }
开发者ID:CheneyWu,项目名称:coreclr,代码行数:23,代码来源:stringconcat1.cs

示例14: ParseLine

 private void ParseLine(string IfText, string OldText, ref SByte Value, bool Compatibility, bool Load, bool ignoreZero = true)
 {
     String V = Value.ToString(); ParseLine(IfText, OldText, ref V, Compatibility, Load, ignoreZero); Value = SByte.Parse(V);
 }
开发者ID:MisterDr,项目名称:FOCommon,代码行数:4,代码来源:ItemProtoParser.cs

示例15: ReadSByte

 public SByte ReadSByte(string ASection, string AKey, SByte ADefault)
 {
     SByte X;
     string Result = ReadString(ASection, AKey, ADefault.ToString());
     return (SByte.TryParse(Result, out X)) ? X : ADefault;
 }
开发者ID:Robin--,项目名称:RMLib,代码行数:6,代码来源:IniFile.cs


注:本文中的System.SByte.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。