July 24, 2020

Srikaanth

Symantec Most Frequently Asked Latest ASP.NET Interview Questions Answers

How Can You Overload A Method?

Different parameter data types, different number of parameters, different order of parameters.

If A Base Class Has A Bunch Of Overloaded Constructors, And An Inherited Class Has Another Bunch Of Overloaded Constructors, Can You Enforce A Call From An Inherited Constructor To An Arbitrary Base Constructor?

Yes,

just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.

What Is The Difference Between System.string And System.stringbuilder Classes?

System.String is immutable; System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

What Is The Advantage Of Using System.text.stringbuilder Over System.string?

StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created.

Can You Store Multiple Data Types In System.array?

No.

What Is The Difference Between The System.array.copyto() And System.array.clone()?

The first one performs a deep copy of the array, the second one is shallow.

How Can You Sort The Elements Of The Array In Descending Order?

By calling Sort() and then Reverse() methods.

What Is The .net Datatype That Allows The Retrieval Of Data By A Unique Key?

HashTable.

What Is Class Sortedlist Underneath?

A sorted HashTable.

Will Finally Block Get Executed If The Exception Had Not Occurred?

Yes.

What Is The C# Equivalent Of C++ Catch (....), Which Was A Catch-all Statement For Any Possible Exception?

A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.

Can Multiple Catch Blocks Be Executed?

No,

once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block.

Why Is It A Bad Idea To Throw Your Own Exceptions?

Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project.

What Is A Delegate?

A delegate object encapsulates a reference to a method. In C++ they were referred to as function pointers.

What Is A Multicast Delegate?

It is a delegate that points to and eventually fires off several methods.

How Is The Dll Hell Problem Solved In .net?

Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly.

What Is A Satellite Assembly?

When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies.

What's The Difference Between // Comments, /* */ Comments And /// Comments?

Single-line, multi-line and XML documentation comments.

How Do You Generate Documentation From The C# File Commented Properly With A Command-line Compiler?

Compile it with a /doc switch.

What Is The Difference Between <c> And <code> Xml Documentation Tag?

Single line code example and multiple-line code example.

Is Xml Case-sensitive?

Yes,

so <Student> and <student> are different elements.
Symantec Most Frequently Asked Latest ASP.NET Interview Questions Answers
Symantec Most Frequently Asked Latest ASP.NET Interview Questions Answers

What Debugging Tools Come With The .net Sdk?

CorDBG – command-line debugger, and DbgCLR – graphic debugger. Visual Studio .NET uses the DbgCLR. To use CorDbg, you must compile the original C# file using the /debug switch.

What Does The This Window Show In The Debugger?

It points to the object that is pointed to by this reference. Object is instance data is shown.

What Is The Best Way To Output Only Time And Not Date?

Use DateTime as follows VB.NET
Response.Write(DateTime.Now.ToString("hh:mm:ss"))

C#
Response.Write(DateTime.Now.ToString("hh:mm:ss"));

Do I Have To Compile Code If I Am Changing The Content Of My Aspx.cs File?

Yes if you have used Codebehind="my.aspx.cs".

if not  you used src="my.aspx.cs" in your page declaration.

How To Grab The Referring Url?

VB.NET
Response.Write ( Request.UrlReferrer.ToString())

C#
Response.Write ( Request.UrlReferrer.ToString());

My Asp Code Gives An Error "compiler Error Message: Bc30289: Statement Cannot Appear Within A Method Body. End Of Method Assumed" When Changed To .aspx?

Use a <script runat="server" type="text/javascript"> block instead of the <% %> syntax to define Subs.Make sure you have proper events associated with the code and have start and end of procedure or function wirtten properly.

How Can I Save Images ?

You need a stream to read the response, WebResponse. GetResponse Stream(), and a stream to write it to the hard drive. FileStream should do the trick. You'll have to write to the filestream what you read from the response stream.

Subscribe to get more Posts :