달력

03

« 2010/03 »

  •  
  • 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
  •  
  •  
  •  
FontFamily[] fonts = FontFamily.Families;
foreach (FontFamily font in fonts)
     Console.WriteLine(font.Name);
TAG C# font
Posted by 싸구려코드
오직 하나의 프로그램만 실행할 경우...

힌트 URL : 데브피아 - http://www.devpia.com/MAEUL/Contents/Detail.aspx?BoardID=217&MAEULNO=8&no=25391&page=1
참고 URL : MSDN - http://msdn2.microsoft.com/ko-kr/library/system.threading.mutex(en-us).aspx


TAG c#, sample
Posted by 싸구려코드
2007/09/11 10:09

Delegate(델리게이트) Example 1 Computer/IT/C#2007/09/11 10:09


using System;
using System.Collections.Generic;
using System.Text;

namespace DelegateExample
{
    public class Calc
    {
        public static void Sum(int x, int y)
        {
            Console.WriteLine("{0} + {1} = {2}", x, y, (x + y));
        }

        public static void Mul(int x, int y)
        {
            Console.WriteLine("{0} * {1} = {2}", x, y, (x * y));
        }

        public static void Div(int x, int y)
        {
            Console.WriteLine("{0} / {1} = {2}", x, y, (x / y));
        }

        public static void Sub(int x, int y)
        {
            Console.WriteLine("{0} - {1} = {2}", x, y, (x - y));
        }
    }

    public class MainClass
    {
        public delegate void CalDelegate(int a, int b);

        public static void Main(string[] args)
        {
            CalDelegate caldelegate = new CalDelegate(Calc.Sum);
            caldelegate += new CalDelegate(Calc.Sub);
            caldelegate += new CalDelegate(Calc.Mul);
            caldelegate += new CalDelegate(Calc.Div);
            caldelegate(3, 5);
        }
    }

}


실행결과
사용자 삽입 이미지

Posted by 싸구려코드