What is difference between these two statement? if variable is declared and assign value in following two waysString sValue = (String)GridView1.DataKeys[GridView1.SelectedIndex].Value;String sValue = GridView1.DataKeys[GridView1.SelectedIndex].Value.ToString();
Latest Answer: The only difference between the two is in the second example you are actually
doing the boxing of the value type into a reference type onto the stack. As
every type in C# is derived from the type 'object', they all have the .ToString
method. The ...
What is the default access specifier for a Top Level Class,which are not nested into another classes
You have several instances of the following class (User). Provide a class with three methods:"AddUser" accepts a User instance as a parameter and add it to a collection."GetUser" accepts
Latest Answer: Here's an easy way to take care of the sorting part by using the new Linq feature in .NET 3.5Assuming you have an ArrayList with all the user objects.ArrayList array = new ArrayList();Add all the user objects...........//Arraylist isn't supported ...
how to find out how many calender days are there between two dates in c#.net?
Latest Answer: Here is the better answer:DateTime fDate = DateTime.Now;int thisDay = fDate.DayOfYear; //if today's date is 31/12/2008, thisDay will be 365 and if today's date is 01/01/2009, thisDay will be 1.Therefore, you can use DayOfYear propery to get ...
Latest Answer: A process is an entity that: 1) Receives independant resource allocations ( CPU, memory, etc)2) Has its own address space ( which means that it can't access variables or data structures belonging to a different process) 3) Maintains state ...
User is continuously entering some in GUI and it is doing some background processing and updating in GUI. How to do it without flickering the GUI using MFC?Thanks,Raja Gregory
Latest Answer: this.SetStyle(ControlStyles.DoubleBuffer, true); this.SetStyle(ControlStyles.UserPaint, true); ...
Explain how many classes can an interface inherit?
Latest Answer: Interface cannot inherit classes.Interfaces are used to define the methods and properties and the implementation is provided in the class that inherites interface ...
What kind of design patterns can be used for C# development projects?
Latest Answer: A design pattern can solve many problems by providing a framework for building an application. Existing design patterns make good templates for your objects, allowing you to build software faster. There are several popular design patterns used ...
What is the advantage of using delegates and Generics in c# .
Latest Answer: Adding on sutanu_halder answer: 1. Delegate executes asynchronousely, while Generice execute synchronousely. 2. Delegate is not type safe. We can define anonymous method which can execute without creating delegate object in memory. Generic is type-safe. ...
Explain the Generations Algorithm used in the context of Garbage Collector
Latest Answer: Garbage collection in .Net is an automated process. All objects are swept by the GC to check if they are still alive and are assigned a generation each sweep. The lower the generation the more frequently the objects are checked for example a gen 1 may ...
View page << Previous 1 [2] 3 4 5 6 7 8 9 10 Next >>

Go Top