How to send email using C#

C# provides many built in exiting features to make developer life easy. SmtpClient class is one of them. SmtpClient has every thing that we need to send email from our application. Namespace : System.Net The following program illustrate how to send email using SmtpClient from our Asp.Net application. SmtpClient s = new SmtpClient(); s.Host =...

Continue reading

XML Serialization in C#

XML Serialization XML Serialization serialize only public fields, properties of an object and parameters and return value of a method. That is why it is called Shallow Serialization.  XML serialization results in strongly typed classes with public properties and fields that are converted to XML. System.Xml.Serialization has all the classes and...

Continue reading

Binary Serialization in C#

Binary Serialization Binary serialization uses binary encoding to produce compact serialization for uses such as storage or socket-based network streams. It is also known as deep serialization. Because it serialize every thing of an object. Example In this example we take an employee class. It has two attribute EmpId and EmpName.   using...

Continue reading

SOAP Serialization in C#

SOAP serialization uses SOAP encoding to produce compact serialization for uses such as web service. Example In this example we take an employee class. It has two attribute EmpId and EmpName.   using System; using System.Runtime.Serialization; namespace Example_Serialization { [Serializable] public class Employee :¬†ISerializable { public...

Continue reading