ExtensionMethods ready

This commit is contained in:
2019-01-06 12:02:58 +01:00
parent 1144ccd724
commit 786b398e26
6 changed files with 146 additions and 0 deletions

View 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);
}
}
}