static StackObject *ToString_11(ILIntepreter __intp, StackObject *__esp, List <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 1); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.SByte instance_of_this_method = GetInstance(__domain, ptr_of_this_method, __mStack); var result_of_this_method = instance_of_this_method.ToString(); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
static StackObject *ToString_13(ILIntepreter __intp, StackObject *__esp, List <object> __mStack, CLRMethod __method, bool isNewObj) { ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *ptr_of_this_method; StackObject *__ret = ILIntepreter.Minus(__esp, 2); ptr_of_this_method = ILIntepreter.Minus(__esp, 1); System.String format = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack)); __intp.Free(ptr_of_this_method); ptr_of_this_method = ILIntepreter.Minus(__esp, 2); System.SByte instance_of_this_method = GetInstance(__domain, ptr_of_this_method, __mStack); var result_of_this_method = instance_of_this_method.ToString(format); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
// Nullable Types. /// <summary> /// Converts the value of the specified nullable 8-bit signed integer to its equivalent SqlString representation. /// </summary> /// <param name="value">A nullable 8-bit signed integer.</param> /// <returns>The SqlString equivalent of the value of value.</returns> public static SqlString ToSqlString(SByte? value) { return value.HasValue ? value.ToString() : SqlString.Null; }
/// <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(); }
// 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; }
public static SqlString ToSqlString(SByte p) { return p.ToString(); }
public static SqlChars ToSqlChars(SByte? p) { return p.HasValue? new SqlChars(p.ToString().ToCharArray()): SqlChars.Null; }
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); }
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); } }
public static String ToString(SByte? p) { return p.ToString(); }
// // Helper for Enum.Format(,,"d") // private static String DoFormatD(ulong rawValue, RuntimeImports.RhCorElementType corElementType) { switch (corElementType) { case RuntimeImports.RhCorElementType.ELEMENT_TYPE_I1: { SByte result = (SByte)rawValue; return(result.ToString()); } case RuntimeImports.RhCorElementType.ELEMENT_TYPE_U1: { Byte result = (Byte)rawValue; return(result.ToString()); } case RuntimeImports.RhCorElementType.ELEMENT_TYPE_BOOLEAN: { // direct cast from bool to byte is not allowed bool b = (rawValue != 0); return(b.ToString()); } case RuntimeImports.RhCorElementType.ELEMENT_TYPE_I2: { Int16 result = (Int16)rawValue; return(result.ToString()); } case RuntimeImports.RhCorElementType.ELEMENT_TYPE_U2: { UInt16 result = (UInt16)rawValue; return(result.ToString()); } case RuntimeImports.RhCorElementType.ELEMENT_TYPE_CHAR: { Char result = (Char)rawValue; return(result.ToString()); } case RuntimeImports.RhCorElementType.ELEMENT_TYPE_U4: { UInt32 result = (UInt32)rawValue; return(result.ToString()); } case RuntimeImports.RhCorElementType.ELEMENT_TYPE_I4: { Int32 result = (Int32)rawValue; return(result.ToString()); } case RuntimeImports.RhCorElementType.ELEMENT_TYPE_U8: { UInt64 result = (UInt64)rawValue; return(result.ToString()); } case RuntimeImports.RhCorElementType.ELEMENT_TYPE_I8: { Int64 result = (Int64)rawValue; return(result.ToString()); } default: Contract.Assert(false, "Invalid Object type in Format"); throw new InvalidOperationException(SR.InvalidOperation_UnknownEnumType); } }
public static SqlString ToSqlString(SByte? p) { return p.HasValue? p.ToString(): SqlString.Null; }
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; }
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; }
public static Mono.Math.BigInteger ToMonoBigInteger(SByte value) { return Mono.Math.BigInteger.Parse(value.ToString("#")); }
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); }
public static BigInteger ToBigInteger(SByte value) { return BigInteger.Parse(value.ToString("#")); }
public static string ToString(SByte value) { return value.ToString(CultureInfo.InvariantCulture); }
// IConvertible public string ToString(string format, IFormatProvider formatProvider) { return(m_v.ToString(format, formatProvider)); }
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; }