Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


When to use var or IEnumerable to store query result in LINQ?



When to use var or IEnumerable to store query result in LINQ?..

Answer / Mohd Kasim Khan

Use var when you don't need the specific type of the collection. The compiler will infer the correct type based on the query results. Use IEnumerable when you want to explicitly specify that the collection is an IEnumerable and can be iterated.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More LINQ Language-Integrated Query Interview Questions

How to write LINQ query for Inner Join with and condition?

1 Answers  


How to use distinct in linq query?

1 Answers  


What is meant by linq in c#?

1 Answers  


what is the role of DataContext classes in LINQ?

1 Answers  


What is linq in c# with example?

1 Answers  


Explain what are linq compiled queries?

1 Answers  


What is first in linq?

1 Answers  


What do you understand by linq? Enlist its types.

1 Answers  


How to pass parameters to stored procedure using linq?

1 Answers  


List out the three main components of linq? Explain what is the extension of the file, when linq to sql is used?

1 Answers  


How to write linq query in javascript?

1 Answers  


Write the basic syntax of a LINQ query in Visual Basic as well as in C#.

1 Answers  


Categories