3월, 2017의 게시물 표시

[c#] Split practice

이미지
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 using   System ; using   System .Collections.Generic; using   System .Linq; using   System .Text; using   System .Threading.Tasks;   namespace  ConsoleApplication8 {      class  Program     {          static   void  Main( string [] args)         {              string  strNumber  =   "1,2,3,4,5,6,7,8,9,10" ;                string [] eachNumber  =  strNumber.Split( ',' );                foreach  ( string  a  in  eachNumb...

[c#] Serialization practice2

이미지
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 using   System ; using   System .Collections.Generic; using   System .Text; using   System .Threading.Tasks; using   System .Xml.Serialization; using   System .IO;   namespace  ConsoleApplication7 {     [Serializable]      public   class  Customer     {          public   string  Id { get; set; }        ...

[c#] Serializable practice1

이미지
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 using   System ; using   System .Collections.Generic; using   System .Text; using   System .Threading.Tasks; using   System .Xml.Serialization; using   System .IO;   namespace  ConsoleApplication6 {     [Serializable]      public   class  Student     {            public   string  Id { get; set; }          public   string  Name { get; set; }          public   string  PhoneNumber { get; set; }       } ...

[c#] Dictionary practice2

이미지
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 using   System ; using   System .Collections.Generic; using   System .Text; using   System .Threading.Tasks;   namespace  ConsoleApplication5 {      class  Student     {          public   string  Id { get; set; }          public   string  Name { get; set; }          public   string  Address { get; set; }          ...

[c#] Dictionary practice1

이미지
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 using   System ; using   System .Collections.Generic; using   System .Text; using   System .Threading.Tasks;   namespace  ConsoleApplication4 {      class  Program     {          static   void  Main( string [] args)         {              Dictionary < string ,  int >  mydic  =   new   Dictionary < string ,  int > ();                //ADD             my...

[c#] this Keyword

이미지
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 using   System ; using   System .Collections.Generic; using   System .Linq; using   System .Text; using   System .Threading.Tasks;   namespace  ConsoleApplication3 {      class  GrandParent     {          public   static   string  name  =   "Kim" ;          public   static   int  age  =   60 ;            //디폴트 생성자가~ 파라메터가 하나 있는 생성자를 호출하기위해 this 키워드를 사용한다.          public  GrandParent()...

[c#] inheritance practice5

이미지
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 using   System ; using   System .Collections.Generic; using   System .Linq; using   System .Text; using   System .Threading.Tasks;   namespace  ConsoleApplication3 {      class  GrandParent     {          public   string  FirstName  =   "Rowin" ;          public   string  LastName  =   "Kim" ;     }          class  Parent : GrandParent     {     ...