[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Enum.cs, 1.11, 1.12
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Enum.cs, 1.11, 1.12 |
Date: |
Sun, 20 Jul 2003 15:45:57 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System
In directory subversions:/tmp/cvs-serv17081/runtime/System
Modified Files:
Enum.cs
Log Message:
zero padding for hexadecimal formatting of enums
Index: Enum.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Enum.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** Enum.cs 15 Apr 2003 11:22:32 -0000 1.11
--- Enum.cs 20 Jul 2003 19:45:55 -0000 1.12
***************
*** 106,110 ****
// Determine what to do based on the format.
! if(format == "G" || format == "g")
{
#if CONFIG_REFLECTION
--- 106,110 ----
// Determine what to do based on the format.
! if(format == "G" || format == "g" || format=="")
{
#if CONFIG_REFLECTION
***************
*** 130,134 ****
else if(format == "X" || format == "x")
{
! return
((IFormattable)value).ToString("X", null);
}
else if(format == "D" || format == "d")
--- 130,145 ----
else if(format == "X" || format == "x")
{
! /* Note: ECMA says atleast '8' and
MS.NET does
! * the same as the underlying size */
! #if !ECMA_COMPAT
! Type
type=Enum.GetUnderlyingType(enumType);
! if(type==typeof(Byte) ||
type==typeof(SByte)) format="X2";
! if(type==typeof(Int16) ||
type==typeof(UInt16))format="X4";
! if(type==typeof(Int32) ||
type==typeof(UInt32))format="X8";
! if(type==typeof(Int64) ||
type==typeof(UInt64))format="X16";
! #else
! format="X8";
! #endif
! return
((IFormattable)value).ToString(format, null);
}
else if(format == "D" || format == "d")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System Enum.cs, 1.11, 1.12,
Gopal.V <address@hidden> <=