.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> .NET Framework >> Post New Question Subscribe to Interview Questions

Which is the extension method of IList that returns elements based on the given type?

Posted By :Jean Paul     Posted Date :June 02, 2011    Points :40   Category :.NET Framework 
OfType()

Eg: list.OfType<int>();

You can also find related Interview Question to Which is the extension method of IList that returns elements based on the given type?  below: 

What are the requirements to create a CLR based user-defined type?

  
CLR must be enabled for the instance and A class created with a CLR-compatible language. (More...)

What is an Extension of entity type?

  
The collections of entities of a particular entity type are grouped together into an entity set. (More...)

How do I call a member method and pass a primitive type (Value Type) by reference?

  
Use the ref keyword when declaring the parameter of the method, for example:

public bool GetValue( ref int returnValue );

This will pass the numeric by reference.You can modify the value of returnValue within the body of GetValue and it will persist when the method call returns. (More...)

Why do I get an error (CS1006) when trying to declare a method without specifying a return type?

  
If you leave off the return type on a method declaration, the compiler thinks you are trying to declare a constructor. So if you are trying to declare a method that returns nothing, use void. The following is an example: // This results in a CS1006 error public static staticMethod (mainStatic obj) // This will work as wanted public static void staticMethod (mainStatic obj) (More...)

Is the Where() method residing in List class or IList class?

  
It is an extension method in a static class Enumerable.cs (More...)

Is the method Where() using lambda expression returns values immediately.

  
Nope. It is deferred execution. It will return an object which contains the information to execute the query. The actual filtering happens when the enumeration of elements starts.

The enumeration could be started by using a foreach loop. (More...)

What is the difference between OrderBy() and Sort() method over IList

  
OrderBy() sorts and gives the view IEnumerable(). But underlying list is sorted or not changed.

Sort() modifies the underlying list. (More...)

How do you call a Member method and pass a value Type by reference?

  
use the "ref" keyword when declaring a Parameter of the Method
Ex:
public bool GetValue(ref int returnvalue);
(More...)

How do you call a Member method and pass a value Type by reference?

  
use the "ref" keyword when declaring a Parameter of the Method (More...)

In WCF, is returning a void return type returns anything ?

  
[ServiceContract]

public interface IService1

{

[OperationContract]

void Employee(string value);

}


In the above case, the response message is still being sent back to the client. The difference is it sends an empty SOAP body.
So, returning void doesn't mean it will not return anything to the Client !

(More...)

What is Method overloading?

  
Method overloading occurs when a class contains two methods with the same name, but different signatures. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend