parent.cs
来自「NHibernate NET开发者所需的」· CS 代码 · 共 37 行
CS
37 行
using System;
using Iesi.Collections;
namespace NHibernate.Test.NHSpecificTest.Docs.ExampleParentChild
{
public class Parent
{
private long _id;
private ISet _children;
public Parent()
{
}
public long Id
{
get { return _id; }
set { _id = value; }
}
public ISet Children
{
get { return _children; }
set { _children = value; }
}
public void AddChild(Child c)
{
if (this.Children == null)
{
this.Children = new HashedSet();
}
this.Children.Add(c);
c.Parent = this;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?