How do you determine a double variable is Double.NaN ? A sample: if (minSelectX != Double.NaN) { DateTime timeMinSelectX = DateTime.FromOADate(minSelectX); } The code above is not correct. You will get an error like following: The reason is when minSelectX is NaN, the condition of “if (minSelectX != Double.NaN)” will be still true. The right [Read More ...]

There was no Thread.Join method in .NET 1.1, it is only available in .NET 2.0 and later. Thread.Join(): Blocks the calling thread until a thread terminates, while continuing to perform standard COM and SendMessage pumping. Thread.Abort(): Raises a ThreadAbortException in the thread on which it is invoked, to begin the process of terminating the thread. [Read More ...]

If you are learning C, C++ or even Java, the first code example might be similar, they are all a example named Hello World. We found a interesting article which collects all Hello World example in different languages. For example: In C: #include <stdio.h> int main(void) { printf("Hello world\n"); return 0; } In C++: #include [Read More ...]

  We have a Windows Forms solution which includes multiple sub projects, and since long time, we used Visual Studio 2005, and then 2008, now we are using Visual Studio 2010 to develop this solution. We never gotten this kind of compile error on Windows XP when we convert the solution from lower Visual Studio [Read More ...]

From Microsoft : An OLE Automation date is implemented as a floating-point number whose integral component is the number of days before or after midnight, 30 December 1899, and whose fractional component represents the time on that day divided by 24. For example, midnight, 31 December 1899 is represented by 1.0; 6 A.M., 1 January [Read More ...]

We have a C# application which built in Windows XP using Visual Studio 2010, when we install this application to a 64-bit Windows 7 PC, we got the following error message in a popup windows: Retreving the COM class factory for component with CLSID{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC} failed due to the following error:80040154 Class not registered (Exception from [Read More ...]

How to Calculate how many days (hours, seconds…) between 2 DateTime values  ? Very easy: Here we have 2 DateTimes: StartTime, EndTime int idays = EndTime.Subtract(StartTime).Days;int iHours = EndTime.Subtract(StartTime).Hours;int iMinutesdays = EndTime.Subtract(StartTime).Minutes;int iSeconds = EndTime.Subtract(StartTime).Seconds;

Today I give a topic which maybe most of us are interested in it,  no matter you are a C++ or C# programmer, or even you are not a programmer, it is from the following questions which most of us always asked: 1: Why theres is no more Pointer in C#?2: How to release memory [Read More ...]

Here is a nice article about Overload vs Overriding: Q: Method Overloading ? Ans: Method overloading means having two or more methods with the same name but different signatures in the same scope. These two methods may exist in the same class or anoter one in base class and another in derived class.When to use [Read More ...]

A nice computer programming notes website, the author recorded lots of experience and notes from his projects, which is very good reference site for other programmers. Here is his site. For example, here is about C#.

© 2013 CodeEase.com Suffusion theme by Sayontan Sinha