ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • 클래스 멥버 관련소스
    .NET/C# Basic 2008. 10. 1. 16:36
    반응형



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

    namespace ConsoleApplication3
    {
        class Point
        {
            private int x;
            private int y;
            
            public void SetPoint(int ax, int ay)
            {
                x = ax;
                y = ay;
            }
            public void showPoint()
            {
                Console.WriteLine("(x,y) = ({0}, {1})", x, y);
            }
        }

        class Class1
        {
            static void Main()
            {
                Point pt = new Point();
                pt.SetPoint(100, 200);
                pt.showPoint();              
                
            }
        }
    }


    ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 
    반응형

    '.NET > C# Basic' 카테고리의 다른 글

    프로퍼티 설명 get/set  (0) 2008.10.01
    프로퍼티 예제  (0) 2008.10.01
    프로퍼티  (0) 2008.10.01
    인스턴스  (0) 2008.10.01
    클래스 맴버  (0) 2008.10.01
    클래스와 네임스페이스  (0) 2008.10.01
    C# 디버깅  (0) 2008.10.01
    C#에서의 데이터형  (0) 2008.10.01

    댓글

Designed by Tistory.