X
Xavier Wargny
Hi all and each!
Since july, I'm working with dot NET technology. Confident with brand
new tools it gave, I decided to use that new decimal type (related
with the Database type...). After many 'plantages' (critical stops?)
in the communication between my Calculation serveur and my Interface
server, I discovered a problem with the serialization of decimals,
because some values I use are below the Critical Number 0.0001m (I
should blame myself for that, but sometimes, I have to compute with
pressures around Pa, so 1/100000 bars...)
Some functions where I couldn't deal other way, I put strings or
floats instead of having decimals, but I really hate coding like that,
because both side, it comes from or go to decimals.
And today, I saw an old message written in january :
//------------------------------------------------------------------
//Message n° 6 de ce fil
//De :Bobby Mattappally [MSFT] ([email protected])
//Objet :RE: MS Bug? ... Deserialization and Decimal with Exponents
//Groupes de discussion :microsoft.public.dotnet.languages.csharp
//Date :2003-01-16 23:36:04 PST
//
//>Being from MS, can you confirm that this is in fact a bug
//>and if it has been fixed in some to be released version
//>of .net? And if there is a work around for this.
//
//I am told the default behavior for the Decimal.Parse function of not
//accepting Exponents is by design.
//Since decimals represent exact values, it doesn't make sense to
represent
//them in E form. You might as well use Double.
//
//Are you explicitly using the Exponent form in your code? If not, you
may be
//hitting a bug.
//There is a bug , whereby Decimal values less than .0001 gets
serialized
//into Exp format and when deserializing it you get exception. This is
fixed
//in the next version.
//------------------------------------------------------------------
As bobby says, the problem should be fixed in the previous version.
At work, I was said that we use SP2, which is, I think, the last
version. As we are now in december this version must be the "next",
that they were talking about? I'm asking the question because it
doesn't seem having changed anything... And in the fixed problem list
corresponding to the SP2, I didn't see anything related with decimals!
If someone, could please tell me?
Since july, I'm working with dot NET technology. Confident with brand
new tools it gave, I decided to use that new decimal type (related
with the Database type...). After many 'plantages' (critical stops?)
in the communication between my Calculation serveur and my Interface
server, I discovered a problem with the serialization of decimals,
because some values I use are below the Critical Number 0.0001m (I
should blame myself for that, but sometimes, I have to compute with
pressures around Pa, so 1/100000 bars...)
Some functions where I couldn't deal other way, I put strings or
floats instead of having decimals, but I really hate coding like that,
because both side, it comes from or go to decimals.
And today, I saw an old message written in january :
//------------------------------------------------------------------
//Message n° 6 de ce fil
//De :Bobby Mattappally [MSFT] ([email protected])
//Objet :RE: MS Bug? ... Deserialization and Decimal with Exponents
//Groupes de discussion :microsoft.public.dotnet.languages.csharp
//Date :2003-01-16 23:36:04 PST
//
//>Being from MS, can you confirm that this is in fact a bug
//>and if it has been fixed in some to be released version
//>of .net? And if there is a work around for this.
//
//I am told the default behavior for the Decimal.Parse function of not
//accepting Exponents is by design.
//Since decimals represent exact values, it doesn't make sense to
represent
//them in E form. You might as well use Double.
//
//Are you explicitly using the Exponent form in your code? If not, you
may be
//hitting a bug.
//There is a bug , whereby Decimal values less than .0001 gets
serialized
//into Exp format and when deserializing it you get exception. This is
fixed
//in the next version.
//------------------------------------------------------------------
As bobby says, the problem should be fixed in the previous version.
At work, I was said that we use SP2, which is, I think, the last
version. As we are now in december this version must be the "next",
that they were talking about? I'm asking the question because it
doesn't seem having changed anything... And in the fixed problem list
corresponding to the SP2, I didn't see anything related with decimals!
If someone, could please tell me?