Choose the correct option.
1. Dynamic type is non - static type.
2. Dynamic type is static type.
3.Implicit conversion does not work with type dynamic.
4.none of the above
LINQ query can work with?
1.DataSet
2. List<T>
3.Array
4.All of the above
When should you use the OleDbConnection object?
1. When connecting to an Oracle database.
2.When connecting to an Office Access database
3.When connecting to SQL Server 2000
4.none of the above
An interface can contain declaration of?
1. Methods, properties, events, indexers
2.Methods
3.Static members
4.All of the above
Choose the correct one
1. The lambda must contain the same number of parameters as the delegate type.
2.The lambda should not contain the same number of parameters as the delegate type.
3.The return value of the lambda (if any) must be explicitly convertible to the delegate's return type
4.None of the above
Choose the correct one. int[] numbers = { 5, 4, 11, 3, 9, 8, 6, 7, 2, 0 }; var nums = numbers.Skip(4); foreach (var n in nums) { Console.Write(n+” “); }
1.9867 2 0
2. 5411398
3.54113
4.none of the above
Choose the correct one. int[] numbers = { 9, 10, 0, 11 }; var nums = from n in numbers select n + 1; foreach (var i in nums) { Console. Write (i+”,”); }
1.10, 11, 1, 12
2.10, 11, 12, 13
3. 9, 10, 0, 11
4. None of these
Choose the correct one.
1.The return value of the lambda (if any) must be explicitly convertible to the delegate's return type
2.Each input parameter in the lambda must be implicitly convertible to its corresponding delegate parameter.
3.Lamda expression does not work with LINQ.
4.None of the above
For building new types at runtime which class can be used?
1.System
2.System.Object
3. System.NewClass
4.System.Reflection.Emit.
How many readers can simultaneously read data with ReaderWriterLock if there is no writer locks apply?
1.9
2.11
3.13
4.No Limit
How you can merge the results from two separate LINQ queries into a single result set.
1.Use the ToList method.
2. Use the DataContractJsonSerializer class.
3. Use the XElement class.
4.Use the Concat method.
Properties in .NET can be declare as 1. Static, Protected internal, Virtual 2. Public, internal, Protected internal 3. Only public 4. None
1.1, 2
2.3
3.1, 2, 3
4.4
Reflection can be used when?
1. To access attributes in your program's metadata
2.To create type at compile time
3.To access attributes at compile time.
4. None of the above
What LINQ expressions are used to shape results in a query? 1. where 2. select 3. join 4. group
1.2, 4
2. 1, 2
3.3, 4
4.None of the mentioned
When do LINQ queries actually run?
1.When they are iterated over in a foreachloop
2.When calling the ToArray() method on the range variable
3.When calling the ToList() method on the range variable
4.All of the above
Which interface defines the basic extension methods for LINQ?
1. IComparable<T>
2.IList
3.IEnumerable
4.IQueryable<T>
Which LINQ keyword is used to categorize results in a query?
1. where
2.select
3. join
4. group
Which of the following are correct? 1. An interface can be instantiated directly. 2. Interfaces can contain constructor. 3. Interfaces contain no implementation of methods. 4. Classes and structs can implement more than one interface. 5. An interface itself can inherit from multiple interfaces.
1. 3,4,5
2.1,2,3
3.2,3,4
4.All of the above
Which of the following are correct? 1. Delegates are like C++ function pointers. 2. Delegates allow methods to be passed as parameters. 3. Delegates can be used to define callback methods. 4. Delegates are not type safe.
1. 1,3,4
2. 1,2,3
3. 2,3,4
4.All of the above
Which of the following are value types?
1.String
2.System .Value
3.System.Drawing
4. System.Drawing.Point
Which of the following objects represents a LINQ to SQL O / R map?
1. DataSet
2.XElement
3.ObjectContext
4. DataContext
Which of the following statements are correct? 1. Indexers enable objects to be indexed in a similar manner to arrays. 2. The this keyword is used to define the indexers. 3. Indexers can be overloaded. 4. Indexer cannot be used in interface
1. 1, 2
2. 3
3.1,2,3
4.none of the above
Which query expression is used to limit the number of results?
1.Skip
2.Take
3.Where
4.Select
According to the given below statements, choose the correct option. Statement 1: Application caching is the process of storing data (and not pages) in a cache object. Statement 2: Page output caching stores a rendered page, portion of a page, or version of a page in memory. Statement 3: Caching reduces the time required to render cached page in future requests.
1.Only statement 1 is correct.
2.Statement 2 and 3 are correct.
3.Only statement 3 is correct.
4.All statements are correct.
An assembly must have an permission to connect with web server is?
1.socketPermission
2.DnsPermission
3. WebPermission
4.TCPPermission
Choose the correct one
1.Variables introduced within a lambda expression are not visible in the outer method.
2.Variables introduced within a lambda expression are visible in the outer method.
3. The lambda should not contain the same number of parameters as the delegate type.
4.None of the above.
Choose the correct one. int[] numbers = { 9, 4, 1, 3, 8, 6, 7, 2,1 }; var nums = numbers.Take(3); foreach (var n in nums) { Console.WriteLine(n); }
1.7 2 1
2.9 4 1
3.3 8 6
4.1 4 9
Choose the correct one. int[] A = { 0, 2, 4, 5, 6, 8 }; int[] B = { 1, 3, 5, 7, 8 }; var nums = A.Union(B); foreach (var n in nums) { Console.Write(n+” “); }
1. 0 24568 13578
2.0 2 4 5 6 8 1 3 7
3.0 1 2 3 4 5 6 7 8
4.none of the above
Choose the correct one. int[] A = { 0, 2, 4, 5, 6, 8, 9 }; int[] B = { 1, 3, 5, 7, 8 }; IEnumerable nums = A.Except(B); foreach (var n in nums) { Console.Write(n +” “); }
1.0, 2, 4, 5, 6, 8, 9
2.1, 3, 5, 7, 8
3. 0 2 4 6 9
4.All of the above
For locking the data with synchronization which class will be used?
1.Moniter
2.SyncLock
3. Moniter
4.Deadlock
If you want to validate the email addresses, Social Security numbers, phone numbers, and dates types of data, which validation control will be used?
1.RegularExpressionValidator
2. CompareValidator
3.RequiredFieldValidator
4.none of the above
In a SQL Statement while working with SqlCommand it returns a single value, at that time which method of Command Object will be used?
1. ExecuteNonQuery
2.ExecuteReader
3.ExecuteScalar
4.All of the above
The best way for handling exception when dealing with a database connection?
1. Implement a try / catch block that catches System.Exceptions.
2. Implementing custom error page.
3. Implement a try / catch block that catches individual exception types, such as SQLException.
4.Display an error message.
Thread class has the following property. A. ManagedThreadID B. IsBackground C. IsBackgroundColor D. Abort
1. 1, 2
2.1, 4
3.4
4.1 ,2, 4
What is lamda expression? 1. Anonymous function 2. Can be used to create delegates 3. Named function 4. None
1.1, 2
2.1, 2, 3
3.1, 3
4. 4
What types of Objects can you query using LINQ?
1.DataTables and DataSets
2. Any .NET Framework collection that implements IEnumerable(T)
3.. Collections that implement interfaces that inherit from IEnumerable(T)
4.All of the above
What types of shapes can LINQ query results be shaped into? 1. Collections of primitive types 2. Collections of complex types 3. Single types 4. Collections of anonymous types
1.1, 2, 4
2.1, 2, 4
3.1,2,3
4.1,3,4
Which delegate is required to start a thread with one parameter?
1.ThreadStart
2. ParameterizedThreadStart
3.ThreadStartWithOneParameter
4.none of the above
Which file contains settings for all .NET application types, such as Windows, Console, ClassLibrary, and Web applications?
1.Web.config
2.Machine.config
3.Global.asax
4.All of the above
Which LINQ statement defines the range variable in a LINQ query?
1.from
2.select
3. join
4.where
Which LINQ statement is used to merge two data sources to perform queries?
1.where
2.select
3. join
4.group of functions
Which object data is included in bookmarks and e-mailed URLs?
1.ViewState
2.cookies
3.Query strings
4. All of the above
Which of the following is dictionary object?
1.HashTable
2. SortedList
3.NameValueCollection
4.All of the above
Which of the following statement / s is / are true?
1.CommitChanges is a method of SqlDataContext.
2. CommitChanges is a method of DataContext.
3. CommitChanges is a method of DbDataContext.
4.CommitChanges is a method of OleDbData Context
Which of the following statement is correct?
1.Anonymous types are class types that derive directly from object.
2.Anonymous types are not class types that derive directly from object.
3.Anonymous types are class types that derive directly from System.Class.
4.None of the above
Which of the following statements is true?
1.LINQ to SQL works with any database.
2.LINQ to SQL works with SQL Server.
3.LINQ to SQL is a CLR feature.
4.LINQ to SQL is a SQL Server feature.
Which property will you set for each RadioButton Control in the group?
1.Specify the same GroupName for each RadioButton.
2.Specify the different GroupName for each RadioButton.
3.Specify the same GroupID for each RadioButton.
4.Specify the same ID for each RadioButton.
You need to identify a type that meets the following criteria: • Is always a number. • Is not greater than 65,535. Which type should you choose?
1. System.UInt16
2. int
3. System.String
4.System.IntPtr
You need to select a class that is optimized for key - based item retrieval from both small and large collections. Which class should you choose?
1.OrderedDictionary class
2.HybridDictionary class
3.ListDictionary class
4.Hashtable class
You want to configure the application to use the following authorization rules in web.config file. • Anonymous users must not be allowed to access the application. • All employees except ABC must be allowed to access the application.
1.<authorization> <deny users=”ABC”> <allow users=”*”> <deny users=”?”> </authorization>
2.<authorization> <allow users=”*”> <deny users=”ABC”> <deny users=”?”> </authorization>
3.<authorization> <allow users=”ABC”> <allow users=”*”> </authorization>
4.<authorization> <deny users=”ABC”> <deny users=”?”> <allow users=”*”> </authorization>