Dec082009
Published by Admin at 8:19 PM under Blog
using System;using System.Collections.Generic;using System.Text;namespace ConsoleApplication1{ class Program { public class Musteri { public List<Siprais> Siparisler; } public class Siparis { public int SiparisNo; } //generic bir methoda giden parametlerinde parametrik olmasını sağlar. //böylece bir mothodun hem int, hem string, hem float gibi değişik //versiyonlarını yazmaya gerek kalmaz. //not: her hangi bir tipin sonuna ? koyarakta nullable oldugunu belirler. // int? i = 5; i = null; // Nullable<int> i = 5; i = null; static void Main(string[] args) { List<String> strArr = new List<string>(); strArr.add(""); List<int> intArr = new List<int> (); intArr.Add(12); Musteri mm = new Musteri(); mm.Siparisler.Add("Pizza"); mm.Siparisler.Add("Cola"); mm.Siparisler.Add("Salata"); Dictionary<string, Musteri> dicArr = new Dictionary<int, Musteri>(); dicArr.Add("1",mm); } }}
Tags:
E-mail | Permalink | Trackback | Post RSS 0 Responses
Published by Admin at 8:17 PM under Blog
.NET ve Interface'ler
Selim GÖKTAŞ Senior Software Developer 0090 536 279 85 31 selimgoktas@hotmail.com