Advertisement
ntamas

struktúrák

Feb 17th, 2014
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.   class Program
  9.   {
  10.     public struct Tanulo
  11.     {
  12.       public int azon;
  13.       public string nev;
  14.       public string varos;
  15.       public int szulev;
  16.     }
  17.     static void Main(string[] args)
  18.     {
  19.       List<Tanulo> lista = new List<Tanulo>();
  20.       Tanulo t1 = new Tanulo();
  21.       t1.azon = 14;
  22.       t1.nev = "Kiss Béla";
  23.       t1.varos = "Miskolc";
  24.       t1.szulev = 1988;
  25.       lista.Add(t1);
  26.       Console.WriteLine(lista[0].nev);
  27.       Console.ReadKey();
  28.     }
  29.   }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement