Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » datatype   (RSS)

Working with Signed Non-Decimal and Bitwise Values [Ron Petrusha]

Recently, a number of questions have surfaced about the accuracy of the .NET Framework when working with the binary representation of numbers. (For example, see https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=295117 .)
Posted by BCLTeam | 6 Comments
Filed under:

Decimal Negative Zero Representation [Lakshan Fernando]

One of our customers wondered recently if we represent negative zero in Decimal. At first glance, it doesn’t look to be the case as seen below; Decimal zero = Decimal .Zero; Decimal negativeZero_1 = new Decimal (0, 0, 0, true , 0); Decimal negativeZero_2
Posted by BCLTeam | 3 Comments
Filed under:

Arbitrary length Integer/Arbitrary precision Double Classes [Ari Weinstein]

Another set of functionality we may want to add in Orcas are classes which can be an integer of arbitrary length, and a double of arbitrary precision (which could essentially be the arbitrary length integer with a decimal offset). Aside from this type
Posted by BCLTeam | 12 Comments
Filed under: ,

Why does Double.Parse(Double.MaxValue.ToString()) not work? [Anthony Moore]

System.Double and System.Single are have inexact precision of decimal digits because internally they are a floating point binary number. As such, beyond a certain number of significant digits, their decimal representation becomes approximate. The standard
Posted by BCLTeam | 1 Comments
Filed under:

How Did System.Decimal Change from V1.0 to V1.1? [Anthony Moore]

There were very few noticeable changes between the V1.0 and the V1.1 release. One change that people sometimes notice is that Decimal looks different across the two versions. The changes are largely cosmetic, although in some rare cases applications have
Posted by BCLTeam | 2 Comments
Filed under:

New Format on the Block [Anthony Moore]

One thing that has not changed much in Whidbey is the set of format strings used by base data types for parsing and formatting. However, there is one new format element supported by the DateTime class that can be very useful if you use the ParseExact
Posted by BCLTeam | 0 Comments
Filed under: ,

How to Work Around Problems Serializing DateTime in XML [Anthony Moore]

I wrote a while ago about problems with the way DateTime worked with features like DataSet, XML Serialization (WebServices) and XmlConvert. Basically, DateTime is always treated as a local time by these XML-based systems, which means that you get incorrect
Posted by BCLTeam | 7 Comments
Filed under: , , ,

DateTime Parsing and Formatting with Time Zones [Anthony Moore]

Here is a new DateTim FAQ entry. What is the relationship between DateTime parsing and formatting and the time zone? Before reading below, see this entry for a more practical description of how to using formatting and parsing for the purposes of storing
Posted by BCLTeam | 7 Comments
Filed under: ,

A short note about Buffer.BlockCopy [Gang Peng]

Buffer.BlockCopy has following signature: public static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count); It copies count bytes from src , beginning at srcOffset , to dst , beginning at dstOffset . srcOffset is the byte offset
Posted by BCLTeam | 2 Comments
Filed under:

Dead C Hacks: Reallocating or Changing an object's type in place in .NET? [Brian Grunkemeyer]

I was recently asked if there was a way to reallocate an object on top of another one, or to change the type of an object at runtime. This must have been a somewhat common practice in native C or C++ programs, perhaps something that C++'s placement new
Posted by BCLTeam | 3 Comments
Filed under: , ,

.NET Arrays, IList<T>, Generic Algorithms, and what about STL? [Brian Grunkemeyer]

When we were designing our generic collections classes, one of the things that bothered me was how to write a generic algorithm that would work on both arrays and collections. To drive generic programming, of course we must make arrays and generic collections

Array.IndexOf performance caveat[Gang Peng]

Array.IndexOf are “generic” methods to search for an item in an one dimensional array. However since they are generic, there are some performance caveats. Array.IndexOf handles arrays in three different ways: (1) If the array is a SZArray (one dimensional
Posted by BCLTeam | 0 Comments
Filed under:

Why Not Add a New DateTime Date Type in Whidbey?

[Anthony Moore] Thanks very much to those who have posted feedback on this issue: http://weblogs.asp.net/bclteam/archive/2004/05/21/136918.aspx This reply to the feedback got quite lengthy, so I started a new entry on it. >> "You COULD have seen
Posted by BCLTeam | 20 Comments
Filed under: ,

Changes to Decimal.ToString between V1.0 and V1.1

[Anthony Moore] There was a change to Decimal class in V1.1 to preserve trailing zeros in the default foramtting. I thought this was well known, but we just recently got a customer support issue on it. Here is an entry that we will shortly add to the
Posted by BCLTeam | 7 Comments
Filed under:

DateTime FAQ Entries

I have recently created some new DateTime FAQ entries to address some questions people have about using DateTime on blogs. Our web site is in transition, so I'm posting some of these into the blog. However, they will eventually be rolled into the DateTime
Posted by BCLTeam | 24 Comments
Filed under: , ,
More Posts Next page »
 
Page view tracker