41. What does assert () method do?
In debug compilation, assert takes in a Boolean condition as a parameter, and shows the error dialog if the condition is false. The program proceeds without any interruption if the condition is true.
42. What’s the difference between the Debug class and Trace class?
Documentation looks the same. Use Debug class for debug builds, use Trace class for both debug and release builds.
43.What are the different ways a method can be overloaded?
Different parameter data types, different number of parameters, different order of parameters with the same name.
44. Is XML case-sensitive?
Yes it is case sensitive.
45. What does the keyword “virtual” declare for a method or property?
It means that the particular method or property can be overridden.
46. 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.
47. How do you convert a value-type to a reference-type?
We can convert a value-type to a reference-type by Use Boxing.
48. What does the term immutable mean?
Immutable means you can't change the current data, but if you perform some operation on that data, a new copy is created.
The operation doesn't change the data itself. Like let's say you have a string object having "Dotnet" value. Now if you say temp = temp + "new value" a new object is created, and values is saved in that. The temp object is immutable, and can't be changed.
49. Does Array.CopyTo make a deep copy?
No.
50. What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
Server.Transfer will prevent round trip. it will redirect pages which or in the same directory. NO way to pass the query strings. Thru http context we can able to get the previous page control values.
Response.Redirect: There is a round trip to process the request. We can redirect to any page external / internal other than aspx. We can pass the query string thru which we can man age sessions.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment