C# 코딩 가이드라인

http://blogs.msdn.com/brada/articles/361363.aspx

Pascal String : 모든 단어의 첫글자만 대문자, 나머진 소문자
camelString : 첫 단어의 첫글자가 소문자

멤버변수, 파라미터, 지역변수명에는 camelString을 쓴다.
그 외에는 PascalString을 쓴다. inteface의 경우 앞에 I 를 붙인다 (예, interface IList {} )

 

C#파일의 구성

namespace MyNamespace

{

    using System;

 

    public class MyClass : IFoo

    {

 

        // fields

        int foo;

 

        // constructors

        public MyClass() { }

 

        // properties

        public int Foo { get { } set { } }

 

        // events

        public event EventHandler FooChanged { add { } remove { } }

 

        // methods

        void DoSomething() { }

        void FindSomethind() { }

 

        //private interface implementations

        void IFoo.DoSomething() { DoSomething(); }

 

        // nested types

        class NestedType { }

 

    }

 

}

 

 

 

 

Nested Type는 되도록 피한다.

Nested Type 혹은 그 생성자가 private 일 경우가 아니면 되도록 밖으로 빼낸다.

 

by kiho | 2006/07/13 01:55 | .NET | 트랙백 | 덧글(0)

트랙백 주소 : http://kiho.egloos.com/tb/2238108
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]

:         :

:

비공개 덧글

◀ 이전 페이지          다음 페이지 ▶