Posted by
zemna on Mar 25, 2010 in
C# |
0 comments
C# 3.0 에서부터 새로 제공되는 기능으로 Extensions 라는 것이 있다.
이 것은 기존에 정의되어 있는 클래스를 확장할 수 있도록 해주는 방법이라고 할 수 있다. 백문이 불여일견이니 어떻게 하는지 한번 살펴보도록 하겠다.
일단 먼저...
Posted by
zemna on Mar 19, 2010 in
.NET 일반 |
0 comments
.NET Framrwork에서는 바이너리(Binary) 파일을 읽고 쓰기위한 BinaryReader, BinaryWriter 클래스를 제공한다.
이 클래스를 이용하면 쉽게 파일을 읽고 쓸 수 있다.
BinaryReader 를 이용한 파일 읽기
// 파일 열기
FileStream fs =...
Posted by
zemna on Mar 19, 2010 in
C# |
0 comments
클래스에서 Copy() 나 Clone() 함수를 제공하지 않아 For 문을 이용해서 대입해야 하는 줄 알았다…
// Generic List 생성
List<int> a = new List<int>();
// 값 추가하기
a.Add(1);
a.Add(2);
a.Add(3);
// List 복제하기
List<int> b = new...
Posted by
zemna on Dec 2, 2009 in
C# |
0 comments
Yesterday I posted a quick update to an article I wrote back in 2007 entitled How to make a full-screen Windows app using VB.NET. Aside from 1 or 2 people saying “Oh man why don’t you be a man and write it using C#?” I reckon it’s a good idea to do that anyway. Thanks Scott for the suggestion. And...
Posted by
zemna on Apr 28, 2009 in
C# |
0 comments
1. 드래그 해서 전달하려고 하는 클래스 선언
namespace DragTest
{
public class Class1
{
public int a = 0;
}
}
2. 드래그(Drag) 하려고 하는 항목에 MouseDown 이벤트를 생성하고 이벤트 내부에 드래그 시작을 알리는 함수 구현
using...