본문 바로가기

C# 프로그래밍

(4)
C#으로 LinkedList 구현 ^^ C#으로 구현한 LinkedList 여전히 null 값에 대한 의문이 남는다. Nullable을 구현해 줘야 되는거 같기는 한데, 제너릭에 자바에서 처럼 extends 라는 키워드 대신에 where 라는 키워드를 사용한다고 하는데 아직까지는 잘 모르겠다. 때문에 null 값으로 지정하지 않고 구현해봐따. ㅋ using System; using System.Collections.Generic; using System.Text; namespace List { public class LinkedList : ListInterface { private Node firstNode; private int length; public LinkedList() { reset(); } public void add(T entr..
C#으로 ArrayList 구현 ^^ 문법도 익히고 C#도 손에 익힐수 있었던 시간.. 뭐 List 에 대한 자료구조는 이해하고 있었기 때문에 만드는데 그렇게 오래 걸리지는 않았다 ^^ 큭큭;; using System; using System.Collections.Generic; using System.Text; namespace List { class ArrayList : ListInterface { private T[] dataSet; private int length; private int initSize; public ArrayList() { reset(); } public ArrayList(int size) { this.initSize = size; this.dataSet = new T[initSize]; this.length = ..
거꾸로 해도 같은지 검사하는 프로그램(C# 버젼) using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication2 { class Test { private String str; public Test(String str) { this.str = str; } public Test() { } public void setStr(String str) { this.str = str; } public void setStr() { Console.WriteLine("검사할 문자열을 입력해줘요"); this.str = Console.ReadLine(); } public void run() { if (str == null) setStr(); Console.Write..
첫 Windows Application 첫 윈도우 응용 프로그램 -_-;; 이라고 하기에는 너무 부끄러운 수준이지만.. -ㅅ-;; C#으로 하는 윈도우 프로그래밍이라고 해서 크게 다를건 없었다. 확실히 이전에 비주얼 베이직으로 했던 윈도우 프로그래밍하고 비슷하다는 느낌을 받았다 문법적으로만 다를 뿐이지 GUI 프로그래밍을 한다는것 자체는 크게 다를바가 없었다. 대략 이러한 환경에서 코딩을 하게 된다. 마우스로 툭툭거리는 부분이 아직은 많지만, 하드코딩을 하는것도 중요하다고 생각하는 바이다.. -_-;; (언제 그럴날이 올지는 모르겠지만;;) 처음으로 만든 C# 프로그래밍 예제이다.. 기대 한것처럼 저런 입력 폼들은 서로 유기적으로 메세지를 교환한다. label 이라는 클래스와 TextBox 라는 클래스 그리고 Button이라는 클래스들로 이루..