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

Top 5 Contributors of the Month

Home >> Code Snippets >> LINQ >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Few Functions of LINQ that can be used with an Array

Posted By:Hefin Dsouza       Posted Date: August 12, 2009    Points: 10    Category: LINQ    URL: http://www.dotnetspark.com  

These are few functions that LINQ gives us to work with an array object.

You can get the Min,Max,Sum and many more.

Dim nums() As Integer = {2, 3, 4, 44, 2, 774, 4, 5, 77, 6, 7, 4, 66, 3, 44, 4, 45, 34, 5, 5}

Console.WriteLine("The Sum is : " & nums.Sum())
Console.WriteLine("The Min is : " & nums.Min())
Console.WriteLine("The Max is : " & nums.Max())

Hefin Dsouza


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

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