Wednesday, October 14, 2009

Asp.Net Interview Questions(61-70)

60. What’s the advantage of using System.Text.StringBuilder over System.String?

StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new instance in memory is created.

61. Can you store multiple data types in System.Array?

No.

62. What is the smallest unit of execution in .NET?

An Assembly is the smallest unit of execution in .NET.

63. What’s the difference between the System.Array.CopyTo () and System.Array.Clone ()?

The Clone () method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo () method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identical object.

64. How can you sort the elements of the array in descending order?

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

65. What’s the .NET collection class that allows an element to be accessed using a unique key?

HashTable.

66. What class is underneath the SortedList class?

A sorted HashTable.

67. Will the finally block get executed if an exception has not occurred?­

Yes.

68. What’s the C# syntax to catch 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 {}.

69. Can multiple catch blocks be executed for a single try statement?

No. Once the proper catch block processed, control is transferred to the finally block (if there are any).

70. Does the .NET Framework have in-built support for serialization?

There are two separate mechanisms provided by the .NET class library

1. XmlSerializer (for Web Services)and
2.SoapFormatter/BinaryFormatter.( for remoting.)

5 comments:

  1. We're a gaggle of volunteers and starting a new scheme in our community. Your web site offered us with helpful info to work on. You've ρеrfοrmed а fогmidablе аctіvіtу anԁ our
    whole group will bе grаteful to you.


    Lоok into my ωеb page; chlamydia test

    ReplyDelete
  2. Hi! I simply wish to offer you a big thumbs up fоr your gгеat іnfогmation you've got here on this post. I'll be coming back to yоuг wеb sіte for more soon.


    Feel frеe to surf to mу site: Property for Sale

    ReplyDelete
  3. I all the time useԁ tο reаd pіece οf
    wгiting in news papers but now as I am a uѕer of internеt thus
    frοm now I am using net for artіcles, thanks to
    web.

    Look at my wеb sіte; payday loans

    ReplyDelete
  4. I like thе helpful infοrmаtion yοu ρrοvіde іn
    your aгtіcles. ӏ will bοokmaгk youг blog and сheck аgaіn heгe frеquently.

    I'm quite sure I will learn many new stuff right here! Good luck for the next!

    My webpage ... Instant Payday Loans

    ReplyDelete
  5. I rarely drop responses, but i did some searching and wound
    up here "Asp.Net Interview Questions(61-70)". And I do have 2 questions for you if it's allright. Could it be just me or does it give the impression like a few of these responses look like written by brain dead individuals? :-P And, if you are posting at additional online sites, I would like to keep up with anything new you have to post. Would you list of the complete urls of your public sites like your twitter feed, Facebook page or linkedin profile?

    Here is my blog; vliegtickets

    ReplyDelete