.NET Framework Interview Questions and Answers (547) - Page 22

What is NLog ?

It is cross-platform (NET Framework, .NET Compact Framework and Mono (on Windows and Unix)) open source logging platform based on .Net Framework.

There are following two different ways to configure NLog in your app

1) Through Configuration file and
2) Programmatically

It is able to process diagnostic messages emitted from any .Net Lang.

Source code for NLog is available on GitHub. You can download a zip file or use GIT client
Which of the below encoding types support Chinese char?

NOTE: This is objective type question, Please click question title for correct answer.
In which scenario you need to choose WCF web service ?

Choose WCF web services when you:

1) Require multiple binding types for supporting different types of client.
2) Want to access from javascript.
3) Want to implement Application Logic Layer.
4) Want to implement specific network protocol (e.g: SOAP, WS-*)
what is IL code in .Net?

.Net architecture supports many languages, we are free to write code in many languges. The beauty of .Net is , it converts all code written in different-different languages into a single common code after compilation,that common code is known as IL code or we can say it MSIL(microsoft intermidate language)code.
How CLR works ?

As we know .Net framework supports code written in different-different languges. In .Net framework all code written in different-different languges is converted into common code after compilation, called IL code.Now clr takes place and looks for an application and system resources .This resources is necessary for our programe code, CLR find them then it turns on JIT compiler and convert IL code into native code and give this code to OS. Finally operating system execute this IL code.
How many asynchronous programming patterns supported in the .NET Framework 4.5 ?

Blow Three asynchronous programming patterns supported in the .NET Framework 4.5

1) APM (Asynchronous Programming Model)

2) EAP (Event-based Asynchronous Pattern)

3)TAP (Task-based Asynchronous Pattern)
What is WatiN ?

WaitN (pronounced as What-in) is automated testing framework developed in C#.

It provides easy way to automate your tests with Internet Explorer (6, 7, 8, 9) and FireFox(2,3) using any .Net Language.

It is easily integrate with your favorit (unit) test tool.

It also Supports AJAX website testing.
How to merge multiple .NET assemblies into a single .NET assembly?

ILMerge is a utility for merging multiple .NET assemblies into a single .NET assembly. It works on executables and DLLs alike and comes with several options for controlling the processing and format of the output.

It is freely available for use from the Tools & Utilities page at the Microsoft .NET Framework Developer Center. ILMerge runs in the v4.0 .NET Runtime, but it is also able to merge assemblies from other framework versions using the /targetplatformoption.
What is Unity ?

It is extensible(change the behavior of the container, or add new capabilities) and lightweight D.I (dependency injection) container for building loosely coupled applications.

You can use it in any type of .NET Framework-based application.

It provides all of the features commonly found in D.I mechanisms.

Also provides following advantages

1. Simplified object creation
2. Instance and type interception
3. Service location capability
4. Increased flexibility by deferring component configuration to the container
Difference between Common Language Runtime of .NET and the Java Virtual Machine

CLR can execute the MSIL code. Any language that is .NET compliant can generate the MSIL code. As a result, CLR supports a wider range of languages, even Java. As against this, Java Virtual Machine can execute bytecode, which can only be generated from Java code.
Difference between JIT compiler and an interpreter

The ‘Just-In-Time’ compiler compiles the code on a method-by-method basis when they are called. This code is then cached in memory for later use. An Interpreter compiles the code one line at a time and executes it. As a result, the JIT compilation is always faster than interpretation.
Difference between Web Services and DCOM

- Web Services use XML technology, whereas, DCOM doesn’t.

-Web Services use asynchronous calls, whereas, DCOM is synchronous by nature

- Web Services use Simple Object Access Protocol (SOAP) while DCOM uses the proprietary protocol
What is Resgen.exe and what is the purpose of it?

ResGen.exe denotes Resource File Generator. It generates .txt or .restext and also even the XML based .resx files into Common language runtime .resouirce files.

These resource files can be included in the runtime binary executable or satellite assembly.

By any means Resgen.exe fails then it returns -1 as its value.
How does the lifecycle of Windows services differ from Standard EXE?

Windows services lifecycle is managed by Service Control Manager which is responsible for starting and stopping the service and the applications do not have a user interface or produce any visual output, but Standard executable doesnt require Control Manager and is directly related to the visual output
How many generations in Gc within managed heap and what are the default sizes?

NOTE: This is objective type question, Please click question title for correct answer.
How to allow only alphabets using regular expression validator?

NOTE: This is objective type question, Please click question title for correct answer.
write a query allow only 4 characters in name column using sql server?

select name from salary where name like '____'
after like 4 dashes with in single quote
Output:ashu
siri
hari

the output will shown like that it can show only 4 characters
write a query name starts with 's' using sql server?

select * from emp where name like 's%'
output:
siri
spandu
seshu

The query displays the name starts with s only
write a query the name ends with 'i' using sql server?

select * from emp where name like '%i'
output:
aswini
aluri
devi

the query displays the person name ends with i only
List the EmpNo,EName,Sal Daily Sal of all Emps in the ascending order of annual salary?

Select EmpNo,EName,Sal,Sal/30,12 * Sal annual salary from Emp order by annual salary
you can detect by this query
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories