MyAlbum   Pet
DirectX   openGL   Java   C/C++   STL   C#   Python   Window   ActiveX   SE & Refactoring   Game   Unicode   googleDesktop   Network   Database   Web   php   asp   asp.net   Library   QT   wxWidget   Something to read  
ToDo
zelon's WebAlbum
Google Tools
Google Naver map
ToRearrange
OpenOffice.org
Eclipse
Check W3 validator
csharp
e i R f
Anonymous

Contents

1 network 를 C++ 처럼
2 C# 관련글
3 다국어 지원
4 .NET Reflector
5 C# library
6 압축파일 다루기 - zip
7 C++ 에서 넘어온 유저를 위해
8 string and byte[]
9 무료 개발툴
10 정규식 예제
11 sharp development
12 C# 2.0
13 C# 에서 struct 와 class 의 차이점
14 Component 와 control 의 차이점
15 linux 에서의 .NET Framework 구현 - MONO Project
16 WinForm
16.1 TextBox control 에서 항상 제일 마지막줄로 스크롤하기
16.2 ListView control 에서 항상 제일 마지막줄로 스크롤하기
17 network
18 C/C++ 과의 연동
18.1 구조체 연동

1 network 를 C++ 처럼 #


2 C# 관련글 #


3 다국어 지원 #


4 .NET Reflector #


5 C# library #


6 압축파일 다루기 - zip #


    public class ZipOperation
    {
        public static bool extractFile(string zipFileName, string targetDirectory)
        {
            if (!File.Exists(zipFileName))
            {
                Console.WriteLine("Cannot find file '{0}'", zipFileName);

                return false;
            }

            string currentDir = System.IO.Directory.GetCurrentDirectory();

            using (ZipInputStream s = new ZipInputStream(File.OpenRead(zipFileName)))
            {
                Directory.SetCurrentDirectory(targetDirectory);

                ZipEntry theEntry;
                while ((theEntry = s.GetNextEntry()) != null)
                {

                    Console.WriteLine(theEntry.Name);

                    string directoryName = Path.GetDirectoryName(theEntry.Name);
                    string fileName = Path.GetFileName(theEntry.Name);

                    // create directory
                    if (directoryName.Length > 0)
                    {
                        Directory.CreateDirectory(directoryName);
                    }

                    if (fileName != String.Empty)
                    {
                        using (FileStream streamWriter = File.Create(theEntry.Name))
                        {

                            int size = 2048;
                            byte[] data = new byte[2048];
                            while (true)
                            {
                                size = s.Read(data, 0, data.Length);
                                if (size > 0)
                                {
                                    streamWriter.Write(data, 0, size);
                                }
                                else
                                {
                                    break;
                                }
                            }
                        }
                    }
                }
            }
            Directory.SetCurrentDirectory(currentDir);

            return true;
        }
    }

7 C++ 에서 넘어온 유저를 위해 #


8 string and byte[] #

public static byte[] StringToByteArray(string str)
{
    System.Text.ASCIIEncoding  encoding = new System.Text.ASCIIEncoding();
    return encoding.GetBytes(str);
}

9 무료 개발툴 #


10 정규식 예제 #


string input = "125jhoi353kimjinwook";

Regex ex = new Regex("kim");

Match m = ex.Match(input);

if ( m.Success )
{
	Console.WriteLine("ok");

	for ( int i=0; i<m.Groups.Count; ++i )
	{
		Console.WriteLine("group : " + m.Groups[i]);
	}
}
else
{
	Console.WriteLine("failed");
}

11 sharp development #


12 C# 2.0 #


13 C# 에서 struct 와 class 의 차이점 #


14 Component 와 control 의 차이점 #


15 linux 에서의 .NET Framework 구현 - MONO Project #

http://www.mono-project.com

16 WinForm #


16.1 TextBox control 에서 항상 제일 마지막줄로 스크롤하기 #


TextBox 에서 AppendText() 를 이용해서 덧붙이자. 그러면 알아서 간다.

16.2 ListView control 에서 항상 제일 마지막줄로 스크롤하기 #


m_lvFindResult.EnsureVisible(m_lvFindResult.Items.Count - 1);



17 network #


18 C/C++ 과의 연동 #