Delegates in C#

C# delegates are similar to pointers to functions, in C or C++ which are used for implementing events and the call-back methods. It’s a reference type variable which holds the reference to a method and their can be changed at runtime.It uses namespace System.Delegate . It can be declared with “delegate” keyword for example public […]

Read More

How to Integrate Paytm in Aps.Net

Here we will learn, how to integrate Paytm payment gateway in Asp.net website. First we need to signup in Paytm through this link   and  then upload the required document and compliance through this link. Now come to the installation and configuration steps as below. Installation and Configuration Steps for .net These installation steps are for […]

Read More

Enumeration in C#

An enumeration is a set of named integer constants and declared by enum keyword. They are value data type in other words it has their own value or can not inherit. Enumeration list is seperated by comma and by default first enumeration list is 0(or starts with zero). syntax: enum <enum_name> { enumeration_list }; Example: […]

Read More

How to validate XML with XSD file in asp.net using c#

Here we will learn how to validate XML  with XSD file in asp.net using c# with example. //In below example, we are passing three parameters: //xmlString: XML String //XSDPath: Path of XSD file //NamespaceXML: Namespace of xml public static bool IsValidXml(string xmlString, string XSDPath, string NamespaceXML) { bool isValidXML = true; List<string> errrorMssage = null; […]

Read More

XML Serialization and Deserialization in C#

Here we will learn how to implement XML serialization and deserialization in asp.net using c# with example: First, we will do serialization of an object as below example //Pass an object of a class public static string SerializeObject(T Request) { string xmlString = string.Empty; MemoryStream memoryStream = null; XmlSerializer xs = null; XmlTextWriter xmlTextWriter = […]

Read More

Routing in MVC

Routing is a pattern matching system that handles the incoming request and figure out what to do with that request. At runtime, Routing engine use the Route table for matching the incoming request’s URL pattern against the URL patterns defined in the Route table. In Convention based routing, We need to define routes in the […]

Read More

Yield Keyword in C#

yield keyword is used for customized iteration in a collection. It is used inside an iterator block which return iterator type. It can not be used directly inside Main method which is void type. Uses of yield keyword : No need to create temporary list. As it returns value back to caller for every match […]

Read More