Your Ad Here

Sunday, January 11, 2009

.NET

Q : How is ASP .NET different from ASP?
A : Scripting is separated from the HTML, Code is compiled as a DLL, these DLLs can be executed on the server.

Q : What is ADO .NET ? what is difference between ADO and ADO.NET?
A : ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memory database where in I can use relationships between the tables and select insert and updates to the database. I can update the actual database as a batch.

Q : What is the difference between the C#.NET and VB.NET?
A : VB.NET
It didn't have the Operator Overloading.
It didn't have the XML Documentation.
It didn't have the Pointer Type variables.
C#.NET
It has XML Documentation, Operator Overloading and supports Pointer Variables using unsafe keyword
c#.net is the case sensitive.
vb.net is not the case sensitive

Q : How you can create a XML File?
A : To write Dataset Contents out to disk as an XML file use:

Q : How you can create a XML File?
A : To write Dataset Contents out to disk as an XML file use:
MyDataset.WriteXML(server.MapPath("MyXMLFile.xml"))
dataSet.WriteXml(string path);
string str = "";
string s="select * from emp";
SqlCommand cmd = new SqlCommand(s, con);
SqlDataReader dr = cmd.ExecuteReader();
//str += " " ;
str += "";
while (dr.Read())
{
str += "";
str += dr[0].ToString();
str += "
";
str += dr[1].ToString();
str += "
";
}
str += "
";
StreamWriter sw = File.CreateText("D:ampl.xml");
sw.WriteLine(str);
sw.Close();

Q :How is the difference between interface and abstract class?
A : Abstract classes can not be instantiated it can have or cannot have abstract method basically known as mustinherit as the methods are static in nature
where interfaces are the declaration and r defined where they are called used for dynamic methods
Interface needs to be implemented,abstract class has build in implementation.

Q :What is the smart navigation?
A : The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.

Q : How do you validate the controls is an ASP .NET page?
A : Using special validation controls that are meant for this. We have Range Validator, Email Validator.

Q :How do assemblies search each other?
A : By searching directory paths. There are several factors that can affect the path (such as the AppDomain host, and application configuration files), but for weakly named assemblies the search path is normally the application's directory and its sub-directories. For strongly named assemblies, the search path is the GAC followed by the private assembly path.

Q : What is the garbage collection?
A : Garbage collection is a heap-management strategy where a run-time component takes responsibility for managing the lifetime of the memory used by the objects. This concept is not new to .NET - Java and many other languages/runtimes have used garbage collection for some time.


Q :How do you validate controls in an ASP .NET page?
A : Using special validation controls there are meant for this. We have Range Validator, Email Validator.
A : Using special validation controls there are meant for this. We have Range Validator, Email Validator.

Q : What is the difference between Response.Write() andResponse.Output.Write()?
A : Response.Output.Write() allows you to write formatted output

Q : Name two properties common control in every validation
A : ControlToValidate property and Text property.

Q : What is the ViewState?
A : ViewState allows the state of objects (serializable) to be stored in a hidden field on the page. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source. ViewState is used to the retain the state of server-side objects between postabacks.

Q : Difference between a Thread and a Process?
A : Both are individual execution paths, but process timeslicing (and memory space) is enforced by the OS, while thread differentiation is enforced by the applications.

Q : What is the GAC? What is the problem its solve?
A : The Global Assembly Cache. It is stored strongly-named assemblies in a single location, allowing for verification of code library uniqueness when executing.

Q : What is the difference between DataSet and DataTable?
A : Data set can store many tables but a data table can have one table only.

Q : What is the usage of console application?
A : Console Applications are command-line oriented applications that allow us to read characters from the console, write characters to the console and are executed in the DOS version. Console Applications are written in code and are supported by the System. Console namespace.

Q : Describe rapid application development tool?
A : Rapid action development tool describes about the software development process. This tool gives flexibility in iterative development and prototype deployment. It enhances the speed of application development. It is also used for the application maintenance.

Q : What is the MSIL, IL?
A :When compiling to managed code, the compiler translates your source code into the Microsoft intermediate language (MSIL),which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. Microsoft intermediate language (MSIL) is a language used as the output of a number of compilers and as the input to a just-in-time (JIT) compiler. The common language runtime includes a JIT compiler for converting MSIL to native code.

Q : What is the difference between ref and out parameters?
A: An argument passed to a ref parameter must first be initialized. Compare this to out parameter, whose argument does not have to be explicitly initialized before being passed to an out parameter.

Q : How DLL Hell problem solved in .NET?
A : Assembly versioning allows the application to specify not only library it needs to run (which was available under Win32), but also the version of the assembly.

0 comments:

Your Ad Here