My sharing and discussion of topics in C#, WCF, WPF, Winforms, SQL, ASP.Net, Windows Service, Java Script .... with you all.
Wednesday, June 12, 2013
Automatic Windows Locking using Timer
I wrote an article for the same topic for C-SharpCorner site. Please go through the link below:
http://www.c-sharpcorner.com/UploadFile/0f68f2/automatic-system-locking-using-timer/
Thanks,
Hemant Srivastava
Friday, May 24, 2013
Converting DataSet to a Byte Array
Here is the code that can be used for converting a DataSet into its corresponding byte array. Sometimes when we need to send the data across the network through WCF service, we can get advantage of sending our data into a byte array. The reason behind to send the data in Byte Array format is that byte array is the one of the primitive data type available in .Net
private byte[] ConvertDataSetToByteArray(DataSet dataSet)
{
byte[] binaryDataResult = null;
using (MemoryStream memStream = new MemoryStream())
{
BinaryFormatter brFormatter = new BinaryFormatter();
dataSet.RemotingFormat = SerializationFormat.Binary;
brFormatter.Serialize(memStream, dataSet);
binaryDataResult = memStream.ToArray();
}
return binaryDataResult;
}
Thursday, May 16, 2013
SQL query to find Duplicates in multiple columns
I wrote a similar article for the CSharp Corner site. Please go to following link:
http://www.c-sharpcorner.com/UploadFile/0f68f2/finding-duplicates-among-multiple-columns-in-sql/
Thanks,
Hemant
Subscribe to:
Posts (Atom)