Basic Dot Net Interview Questions


1.       Why ’ViewState’ Encryption is required? How to do that?
2.       What are the http verbs available? Differences between GET and POST?
3.       Can overloading possible in WCF?
4.       How Agile Methodology works? Advantages over other processes? Link 
5.       What is worker process in IIS and in ASP.net? Link  Link2 Link3 Link4
6.       How to recycling Worker Process in IIS? Link
7.       How to configure Web Garden ? link2
8.       How GC.Collect works?
9.       Difference between Debug and Release? Link
10.   How to host WCF through WAS?
11.   How to use MarshalByRefObject ?
12.   What is UDF in SQL and how to use it?
13.   System.Diagnostics, how to use this namspace  and purpose?
14.   What is duplex contract and how to use it? link
15.   Transaction in WCF?
16.   Why service behavior is require on interface?
17.   What is the difference between Explicitly Implement and Normal Implement of interface
18.   Difference between debug and release mode
19.   What is channel Factory?
20.   Why rendering is slow for some cases? How to improve the performance?
21.   How to send Bulk data to the SP from DA layer?
22.   What is cross post back?
23.   How to use view state in asp.net page and also in JavaScript?
24.   What is custom serializer?
25.   How to work with Marshal by ref object?
26.   How to interact with multiple servers in C#?
27.   What is static Virtual method? Is static class inherited? If not, why?
28.   How to use IHttphandler and IhttpModule?
29.   How to use IDisposable interface? Why should I use it?
30.   Can I use Store Procedure as an inline function?
31.   In which Scenario I will use Clustered and non clustered Index?
32.   In where clause what type of index used?
33.   What is Connection and Object pooling?
34.   What are the types you know on Generic List?
35.   Why Should I use properties and why not constructor?
36.   How to use net.pipe binding?
37.   Difference between DataContract and Xml Serilizer?
38.   Difference between basicHttp and WSHttp binding?
39.   Details of time out property in wcf client config ?
40.   What SSL mode? Difference between http and https?
41.   Version control in wcf. How do I know as a client that a new version has introduced.
42.   Performance testing in WCF. How to improve performance.
43.   Session provider. What is it and how to work with it.
44.   How to track wcf call later.
45.   Call back method over netTcp binding
46.   Net.tcp and Http binding, which one is best and why?
47.   How to work with sql transaction? What are the properties it has?
48.   What are the available Extension methods? How to work with it?
49.   Implementation details in Heap?
50.   What are the Http verbs?
51.   Design pattern in your project?
52.   Some ideas on .net framework 4.0?
53.   Asynchronous methods and how to use it?
54.   System.IO namespace?
55.   How much experience do you have with threading?  
56.   How to work with Async. delegates, thread pools and the System.Threading classes
57.    Difference between MSI and CAB ,XCopy Deployment ?
58.   How to access outside Assembly class?
59.   Difference between Trace and Debug?
60.   What provider ASP.Net use by default?
61.   Whether index will helpful while update or not?
62.   When garbage collection usually does?
63.   What is Isolation in SQL Server? SQL Profiler?


     You may take a look on this Link for more.
  

Can Multicast Delegate have return types ?


Please take a look on the below example code :


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestHome
{
    class Program
    {
        public delegate int AddMulDel(int no1,int no2);
        public int Add(int num1st,int num2nd)
        {
            return num1st+num2nd;
        }
        public int Mul(int num1st, int num2nd)
        {
            return num1st * num2nd;
        }
        static void Main(string[] args)
        {
            Program p = new Program();
            AddMulDel objamDEL = p.Add;
            Console.WriteLine(objamDEL(10, 20)); // Result = 30

            objamDEL += p.Mul;
            Console.WriteLine(objamDEL.Invoke(10, 20)); // Result = 200
            //Though you have two methods[Add and Mul] in Delegate reference 'objamDEL',
            //Mul method is getting ovirwritten over Add method

            foreach (AddMulDel dm in objamDEL.GetInvocationList())
            {
                List<int> lstInt = new List<int>();
                lstInt.Add(dm(10, 20));
               
                foreach (int item in lstInt)
                    Console.WriteLine(item); //Result :- 30 and 200
            }
            Console.Read();

           
        }
    }
}

.



What are the Basic Advantages of Data Contract Serializer over XML serializer ?

Both the DataContract serilizer and XML Serializer serialize object state to XML content to get interoperability done. But while comparing them, we must say that the Data Contract Serializer is much faster and high controllability than XML Serializer.

First question comes in your mind, why and how?

For example if you have 1000 data members and 1000 methods in your class and you want out of these only 47 data members and 690 methods needs to be serialized.

Now if you are using XML Serializer tag over your class, though you don’t want all thousand methods and all thousand data members should serialize and deserialize, it will serialize all 1000 members and 1000 methods. So unnecessarily we are spending time for serialization/de serialization for unwanted members.

If you are in Data Contract Serilizer, you can use specifically [DataMember] tag over required data members in your class. Like

    [DataContract]
    public class Sample
    {
       [DataMember]
       public int MyProperty { get; set; }
    }

So, only 47 data members will be serialized and deserialized, and you can save time for remaining 953 data members serialization.

Same specific tag like [OperationContract] , can be used on the required methods to save time.

Now if you talk about Control, it can be like using XML sterilizer, though some methods should not be explored/get Consumed to the client, you don’t have that control to restrict them. It can be done using DataContract Serilizer.