FontFamily[] fonts = FontFamily.Families;
foreach (FontFamily font in fonts)
     Console.WriteLine(font.Name);
Posted by 싸구려코드
TAG C# font

Trackback Address :: http://sarangsai.com/trackback/195 관련글 쓰기

댓글을 달아 주세요

오직 하나의 프로그램만 실행할 경우...

힌트 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


Posted by 싸구려코드
TAG c#, sample

Trackback Address :: http://sarangsai.com/trackback/190 관련글 쓰기

댓글을 달아 주세요


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 싸구려코드

Trackback Address :: http://sarangsai.com/trackback/143 관련글 쓰기

댓글을 달아 주세요