In this blog I want to describe you three ways how to write singleton class that is thread safe. First Classpublic sealed class TSSingleton{private static volatile TSSingleton instance = null;private static object syncObj = new object();// make the default constructor private,// so that no can directly create it.private TSSingleton(){}// public property that can only get// the single instance of this class.public static TSSingleton Instance{get {// only create a new instance if one doesn't already ......
Almost as common as the debate over which .NET language to choose is the argument about whether to use DataSets or not. As described above, typed data sets are easy to generate through the designer, provide a type safe API for containing business entity data, and already support advanced features such as change tracking, sorting, filtering, and searching. Some of the resistance to DataSets resulted from several performance shortcomings in the .NET 1.1 implementations. These problems included poor ......
This is a simple query that give us Time and Date seperatly from Date Type in MS SQL 2000.
Select P.Code, Convert(Varchar,P.ArrivalTime,1) as Product_Date, Convert(Varchar,P.ArrivalTime,8) as Product_Time from Product P.
If you Change 1 and 8 in the Convert function you get new formates. I Know that its very simple .