Introduction to Cookies in asp

-Cookies can store upto 4 GB data. -It stores the previous data accessed by any visitor. -Using cookies, we can personalize the user. -Cookies are maintained at client site. It keeps a data with time for expiry time within time frame. If I access the page, it shows the information accessed last time. For Example, Shopping site shows a list of items. If a user re-visits the page, then, the…

View More Introduction to Cookies in asp

Introduction to Session in asp

1. Session is a property of page class in asp.net to pass data from one page to another page. 2. By default, Session mode is inproc. 3. Session has several functions like abandon. Important properties are a) Session Id b) Time Out. 4. Using session, we can not only pass data from one page to another page, we can also sign out at any point of time, which is the…

View More Introduction to Session in asp

Program for Operator Overloading using C Sharp

using System; class TSS {     int fees;     public TSS()     {         fees=0;     }     public TSS(int f)     {         this.fees=f;     }     public static TSS operator+(TSS obj1, TSS obj2)     {         TSS obj = new TSS();         obj.fees=obj1.fees + obj2.fees;         return obj;     }     public void TotalFeeCollection()     {         Console.WriteLine(“Total Fee Collected ” +fees);     }    public static void…

View More Program for Operator Overloading using C Sharp

Task Parallel Library – Async await Task CASE STUDY

Case Study1: When the function does not return any value using System; using System.Threading.Tasks; using System.Threading; class Life {     public static void Main()     {         LongTask();         Console.WriteLine(“Lets go!!”);         Console.ReadLine();     }     public async static void LongTask()     {         await Task.Run(()=>{         Thread.Sleep(5000);         Console.WriteLine(“Bro, Wait for 5 seconds”);         });     } } Case Study2: When the function does returns any value (Injection Technique will…

View More Task Parallel Library – Async await Task CASE STUDY

Program for Array List in C Sharp

using System; using System.Collections; public class Employee {     public int EmpId {get; set;}     public string EmpName {get; set;}     static void Main()     {         ArrayList firstEmp = new ArrayList();         firstEmp.Add(new Employee(){EmpId=101,EmpName=”Shubham”});         firstEmp.Add(new Employee(){EmpId=102,EmpName=”Rajan”});         foreach(object e in firstEmp)         {             Employee currentEmployee = (Employee)e;             Console.WriteLine(“Employee ID:{0},Employee Name:{1}”, currentEmployee.EmpId, currentEmployee.EmpName);         }     } }

View More Program for Array List in C Sharp

Practical Implementation of Indexer in C#

Before studying this article, there is one pre-requisite you should do. You should learn Properties in C#. What is Indexer in C# ? Indexer is an extended version of Properties in C#. It is an array of properties. Things to remember before using Indexer Remove all the private variables within class and take a single variable which act as property. There is no name for Indexer unlike properties in C#.…

View More Practical Implementation of Indexer in C#

Practical Implementation of Properties in C#

Before implementing the concept of Properties in C# language, we must be aware of the fact that every variable is by default Private in that class. So what basically Properties in C# is? What is Properties in C# ? Properties is just an approach to access the variable (by default private) of one class into another class without breaking the concept of data hiding. Suppose we have opened a account in…

View More Practical Implementation of Properties in C#

Write a program for Reflection in C# .Net

If you are learning Reflection in C# .Net and faced difficulties while learning this topic, then, you are at the right place. I will provide you the simplest definition and program to learn this important topic. Let us start with the definition, What exactly the reflection is? In layman terms Reflection means image. Reflection is a namespace in C# language which is applied over assembly to access various information in dll…

View More Write a program for Reflection in C# .Net