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

Which keyword is used for Jump Statements?

NOTE: This is objective type question, Please click question title for correct answer.
What keyword is also called as Jump statements?

throw statement is also known as jump statements which is written inside catch block.
For Example:-
try

{

}
catch(exception ex)
{
throw ex;
}

What is an alternative of return in vb.net?

Exit is an alternative in VB.Net.It is used to exit IF condition and While loop.

For Ex:-
If condition = True/False Then

Exit If
End If

For i As Integer = 1 To cnt-1
If condition = True/False Then
Exit For
End If
Next

Which statement is used for continue looping?

NOTE: This is objective type question, Please click question title for correct answer.
How to continue in For Loop in VB.Net?

Continue For is used for continuing into For Loop in VB.Net.
For index As Integer = 1 To 9    

If index >= 1 And index <= 7 Then
Continue For
End If
Next

Which function is an equivalent of CharIndex in Dot Net?

NOTE: This is objective type question, Please click question title for correct answer.
What is the return type of IndexOf method?

NOTE: This is objective type question, Please click question title for correct answer.
What do we mean by IndexOfAny method?

IndexOfAny method finds the first index of any of the char arguments. It returns -1 if none are found.It is a case-sensitive.It also return the integer value i.e. character position.We have to pass a character array as an argument.
For Example:-
string str1 = "Dot Net";

string str2 = "Funda";
int index_pos = str.IndexOfAny(new char[] { 'o', 'd' });

Which statement is true about IndexOfAny method?

NOTE: This is objective type question, Please click question title for correct answer.
Which statement is true about LastIndexOf method?

NOTE: This is objective type question, Please click question title for correct answer.
Difference between NameSpace and Assembly

NOTE: This is objective type question, Please click question title for correct answer.
How to get the running EXE Path?

We have an Application class,which has a static property as ExecutablePath .
For Example:-
string path = Application.ExecutablePath;

Which Xamarin compiler compiles Xamarin.iOS applications directly to native ARM assembly code?

NOTE: This is objective type question, Please click question title for correct answer.
How Ahead-of-Time ( AOT) Compiler's compilation process works?

It works in two phases.

In the first phase,the assemblies will be precompiled.It is a manual process

In the second phase,the precompiled assemblies are picked up by mono runtime and are compiled.

The AOT code is generated by using the below command

mono --aot myTestProg.exe


The –aot flag generates a file called "myTestProg.exe.so" file that contains the native code which was earlier precompiled by Mono.
Why dynamic code generation does not work in Mono?

Since it does not support System.Reflection.Emit Henceforth, no dynamic code generation will work and Dynamic Language Runtime(DLR) will not be supported. As a cause "dynamic", "ExpandoObject" classes cannot be use in Mono environment.Not only that, any language that was build on the top of DLR like IronPython, IronRuby etc. cannot be use from Mono environment.
What are the features that are disabled in Mono's iOS Runtime:?

The below are the disabled features:

a) Reflection.Emit (since iPhone's kernel doesnot support dynamic code generation)

b) COM bindings (because on Xamarin.iOS, Remoting stack is unavailable)

c) The JIT engine (Since it uses Ahead-of-Time (AOT) compiler for the code compilation that compiles Xamarin.iOS applications directly to native ARM assembly code)

d) Profiler (because on Xamarin.iOS, Remoting stack is unavailable).

e) Metadata verifier (as there is no JIT)
what is prerequisite to be used for 'Having' clause?

NOTE: This is objective type question, Please click question title for correct answer.
Is it necessary to provide user credentials in the windows authentication to submit form authentication?

NOTE: This is objective type question, Please click question title for correct answer.
What is difference between release and debug mode?

Debug Mode

Building an application in debug mode will help at the development time to figure out the errors in the code. We use F5 for Debugging, F10(Step Over) or F11(Step Into) function keys along with breakpoints to investigate the execution process of the program.The .pdb file gets generated in this mode which keep track all the debugging process which on the other hand makes the application to execute slowly (as opposed to release mode). So we can figure out that, in this mode the source code is available to the developers.

Release Mode

At the time of deployment, we deploy the assemblies to the client machine. Henceforth, there is no need to produce the source code and the debug information at the client location . This is done through Release mode. Since no debug information is not generated, henceforth, this is comparatively faster . However, at during the release mode, we obviously use the logging framework and enable tracing so as to get the root cause of the problem of the application when it behaves unexpectedly.Equally, we employ health monitoring to measure the application performance.
What is ResGen.exe tool used for?

NOTE: This is objective type question, Please click question title for correct answer.
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