첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

TestProject.zip
0.00MB

▶ Member.cs

namespace TestProject;

/// <summary>
/// 회원
/// </summary>
public class Member
{
    //////////////////////////////////////////////////////////////////////////////////////////////////// Property
    ////////////////////////////////////////////////////////////////////////////////////////// Public

    #region ID - ID

    /// <summary>
    /// ID
    /// </summary>
    public int ID { get; set; }

    #endregion
    #region 성명 - Name

    /// <summary>
    /// 성명
    /// </summary>
    public string Name { get; set; }

    #endregion
    #region 그룹 ID - GroupID

    /// <summary>
    /// 그룹 ID
    /// </summary>
    public int? GroupID { get; set; }

    #endregion
}

 

300x250

 

▶ Program.cs

using NMemory;
using NMemory.Indexes;
using NMemory.Tables;

namespace TestProject;

/// <summary>
/// 프로그램
/// </summary>
class Program
{
    //////////////////////////////////////////////////////////////////////////////////////////////////// Method
    ////////////////////////////////////////////////////////////////////////////////////////// Static
    //////////////////////////////////////////////////////////////////////////////// Private

    #region 프로그램 시작하기 - Main()

    /// <summary>
    /// 프로그램 시작하기
    /// </summary>
    private static void Main()
    {
        Database database = new Database();

        Table<Member, int> memberTable = database.Tables.Create<Member, int>(member => member.ID, null);

        IIndex<Member, int?> memberGroupIDIndex = memberTable.CreateIndex(new RedBlackTreeIndexFactory(), member => member.GroupID);
    }

    #endregion
}
728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요