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 LINQ is beneficial than Stored Procedures?

1 Answers  


What are conversion operators?

1 Answers  


What are the three main components of linq or language integrated query?

1 Answers  


Explain why select clause comes after from clause in linq?

1 Answers  


What is a linq expression?

1 Answers  


Why is linq required?

1 Answers  


Does entity framework use linq?

1 Answers  


What are linq extension methods?

1 Answers  


How much does a reveal linq cost?

1 Answers  


What is data context class? Explain its role?

1 Answers  


What is difference between linq and entity framework?

1 Answers  


Why do we use linq?

1 Answers  


Categories