Actually these are Some of Interviews Questions that i have to answer in an interview. I have got Some Confusion :-/ in My answers that why posting here .. So that Any Genius Can Answer these Question Correctly
1) Which of the following are true about Extension methods?
1) They must be declared static (Correct)
2) They can be declared either static or instance members
3) they must be declares in the same assembly(but may be in different sources files)
4) Extension methods can be used to override existing instance methods (Correct)
5) Extension methods with the same signature for the same class may be declared in multiple namespace without
causing compilation errors
More than one can be correct?
2) which of the following can one use to detect the user's current language?
1) Examining the user languages property of the current request object
2) Examining the currentCulture property of the current request object
3) Examining the CurrentCulture property of the current thread Object (Correct)
4) Examining the language property of the current page object
3) which of the following are true about Declarative Attributes?
1) They must be inherited from the system.Attribute
2) Attributes are instantiated at the same time as instances of the class to which they are applied
3) Attributes classes may be restricted to be applied only to application element types
4) By default, a given attribute may be applied multiple times to the same application element
More than one can be correct?
4) with Which class is the task of mapping a specfic point in time into units such as weeks, months and year accomplished?
1) System.datetime (Correct)
2) System.timeSpan
3) System.Globalization.Calender
4) System.Globalization.CultureInfo
5) Which of the follwoing elements can be adjusted when using the processModel element of the Machine.Config File ?
1) The number of queued requests befoer returning "Server Busy (error: 503)"
2) The maximum number of threads per processor
3) The maximum number of threads per request
4) The Maximum amount of memory utilized per request (Correct)
6) Determining the availablity of sufficient memory for an operation can be accompished by
1) There is no supported application level means to determine if a specfic amount of memory
is available
2) using static methods of system.runtime.memoryfailpoint and checking the return value
3) creating an instance of system.runtime.memoryfailpoint and monitoring for an insuffcientMemoryException
(Correct)
4) Creating an instance of system.runtime.memoryfailpoint and monitoring for an outofmemoryException
What would be the correct answer?
7) which of the following are true about anonymous types?
1) They can be dervied from any reference type (Correct)
2) Two anonymous types with the same named parameters in the same order declared in different
classed have the same type
3) Anonymous types can have methods
4) All properties of an anonymous types are read/write
5) Anonymous types cannot cross method boundaries
8) which of the following mechanisma are not suitable for returning a single row froma datatable
containing a large number of records?
1) Datatable.rows.find (Correct)
2) Datatable.rows.select
3) Datatable.select
4) Enumerating across datatable.rows
9) Which of the following are valid mechanisms for adding an event handler for public Event someEvent() on class Sample?
1) AddHandler Sample.SomeEvent Addressof MyEventHandler (Correct)
Public Sub MyEventHandler
2) AddHandler Sample.SomeEvent,AddressOf Sample.SomeEvent
3) Private WithEvents Sample As New Sample
Public Sub MyEventHandler(sender As Object,e As EventArgs) Handles sample.SomeEvent
4) Private withEvents sample As New Sample
Public Sub MyEventHandler() Handles sample.SomeEvent (Correct)
More than one can be Correct?
10) Which of the following are true of ADO.NET?
1) it uses a connected provider model (Correct)
2) it uses a Disconnected provider Model (Correct)
3) it includes a dataAdapter class, which provides a high-performance mechanism for retrieving data
4) system.data.common provides classes that are database agnostic
More than One can be Correct..
11) which of the following are true of the system.text.StringBuilder class?
1) it is less efficient than string concatenation when many concatenation are performed
2) There is a method which formats the string being appended to the stringBuilder, much like the string format (Correct)
3) The StringBuilder is most efficient when initialized using the parameterless constructor
4) All of the above
5) None of the Above.
12) in which of the Following Ways do structures differ from classes?
1) Structures cannot implement interfaces
2) Structures cannot inherit from a base structure (Correct)
3) Structures Cannot have events
4) Structures cannot have overrideable methods
13) which of the following is true regarding the system.datetimeoffset structure?
1) it provides an exact point in time relative to the UTC time zone (Correct)
2) it combines a date time structure with a timeZone structure
3) it provides arithemetical operations using values with differenet offsets from the UTC
4) it can be used to determine the specific timeZone for a localtime
More than one Can be Correct
14)Which of the following are true about Nullable Types?
1) A Nullable type is a reference type
2) A Nullable type is a structure (Correct)
3) An implicit converstion exists from any Non-nullable value type to a nullable from of that type (Correct)
4) An implicit conversion exists from any nullable value type to a non-nullable from of that type
5) A predefined conversion from the nullable type S to the nullable type T exists if there is a predefined conversion
non-nullable type S to the non-nullable type T (Correct)
15) which of the following is true about VB Generics?
1) VB Allows non-type template parameters
2) VB supports explicit specialization
3) VB allows the type parameters to be used as the base class for the generic type
4) VB allows a generic type parameter itself to to be a generic
5) VB enforces that all codes are valid for all types of parametrs (Correct)
what would be the Best Choice ?
16) which of the following statements do expression trees fit best?
1) Expression trees are a data structure which can be intially composed using language syntax (Correct)
2) Expression trees are a dynamically generated code which is executed to perform the desired function
3) Expression trees can be created only from Lambda Expressions
4) Expression trees can be modified once again
5) All of the above
17) when using an implicitly typed array, which of the followoing is most appropriate?
1) All elements in the initializer list must of the same type
2)All elements in the initializer list must be implicitly convetable to a known type which is the base type of
atleast one member in the initialize
3) All elements in the initializer list must be implicitly convertable to a common type which is the base type
of the items actually in the list
4) There are no restrictions on the items in the initializer list as the array is not declared to be a specific type
(Correct)
I have also mentioned my answers with my poor knowledge so Please Answer These Question just by the Alphabets(A,B...or E) corresponding with Indexes.
I hope U all will help me to get This Job while answering these question correctly.
Thanks
Best Regards
Salman