Author: Zonixsoft

Convert Date Formats :

  //For ex., Convert MM/dd/YYYY to dd/MM/yyyy string date = “03/27/2008”; //format is MM/dd/yyyy DateTimeFormatInfo dateTimeFormatterProvider = DateTimeFormatInfo.CurrentInfo.Clone() as DateTimeFormatInfo; dateTimeFormatterProvider.ShortDatePattern = “MM/dd/yyyy”; //source date format DateTime dateTime = DateTime.Parse(date, dateTimeFormatterProvider); string formatted = dateTime.ToString(“dd/MM/yyyy”); //write the format in which you want the date tobe converted Response.Write(“<br />” + formatted);

Customizing the Map using Google Maps API

Get ready to code! In this section, we’ll be making changes and additions to the map HTML file to customize the map based on your preferences.   1.    Open your myapp.html file. 2.    Add the code to center the map at particular the latitude/longitude .The line that centers the map in the current code is: […]

Boxing and UnBoxing

    Boxing and unboxing enable value types to be treated as objects. Boxing a value type packages it inside an instance of the Object reference type. This allows the value type to be stored on the garbage collected heap. Unboxing extracts the value type from the object. In this example, the integer variable i is […]

Boxing and UnBoxing

    Boxing and unboxing enable value types to be treated as objects. Boxing a value type packages it inside an instance of the Object reference type. This allows the value type to be stored on the garbage collected heap. Unboxing extracts the value type from the object. In this example, the integer variable i is […]

GZipStream Class to Compress and Decompress Stream Data

Provides methods and properties used to compress and decompress streams. Namespace: System.IO.Compression Assembly: System (in system.dll)   This class represents the gzip data format, which uses an industry standard algorithm for lossless file compression and decompression. The format includes a cyclic redundancy check value for detecting data corruption. The gzip data format uses the same […]

GZipStream Class to Compress and Decompress Stream Data

Provides methods and properties used to compress and decompress streams. Namespace: System.IO.Compression Assembly: System (in system.dll)   This class represents the gzip data format, which uses an industry standard algorithm for lossless file compression and decompression. The format includes a cyclic redundancy check value for detecting data corruption. The gzip data format uses the same […]

SingleTon Object

Introduction Sometime we need a class that has to be instantiated only once. That means we cannot have more than one instance for a class. Here singleton comes into picture. Singleton object is not a new thing come from oops concept. Let us read how easy it is. Implementation Typically every class is instantiated using […]

SingleTon Object

Introduction Sometime we need a class that has to be instantiated only once. That means we cannot have more than one instance for a class. Here singleton comes into picture. Singleton object is not a new thing come from oops concept. Let us read how easy it is. Implementation Typically every class is instantiated using […]