ExtensionMethods ready
This commit is contained in:
21
ExtensionMethods/Program.cs
Normal file
21
ExtensionMethods/Program.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ExtensionMethods
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string post = "This is supposed to be a very long blog post blah blah blah...";
|
||||
var shortenedPost = post.Shorten(5);
|
||||
|
||||
IEnumerable<int> numbers = new List<int>() { 1, 3, 7 , 4 ,9,20,22};
|
||||
var max = numbers.Max();
|
||||
System.Console.WriteLine(max);
|
||||
System.Console.WriteLine(shortenedPost);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user