Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System.Collections.Generic;
  2. namespace ConsoleApplication1
  3. {
  4.     class Program
  5.     {
  6.         static void Main(string[] args)
  7.         {
  8.             var x  = new List<int>{ 1, 2};
  9.             var y = x.Chpok();
  10.         }
  11.     }
  12.     public static class Extensions
  13.     {
  14.         public static IEnumerable<T> Chpok<T>(this IEnumerable<T> a) where T: struct
  15.         {
  16.             return a;
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement