本文整理汇总了C#中model.GetName方法的典型用法代码示例。如果您正苦于以下问题:C# model.GetName方法的具体用法?C# model.GetName怎么用?C# model.GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model
的用法示例。
在下文中一共展示了model.GetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DisplayMember
/// <summary>
/// Display a member to the user
/// </summary>
/// <param name="a_member">model.Member. The member to be displayed</param>
/// <param name="showPNumber">bool. True if the Personal Number should be displayed, false otherwise</param>
/// <param name="showBoats">bool. True if the boats the user owns should be displayed, false if only the number of boats owned should be displayed</param>
public void DisplayMember(model.Member a_member, bool showPNumber, bool showBoats)
{
System.Console.WriteLine("---");
System.Console.WriteLine("MemberID: {0}", a_member.GetMemberID());
System.Console.WriteLine("Name: {0}", a_member.GetName());
if (showPNumber)
{
System.Console.WriteLine("Personal Number: {0}", a_member.GetPNumber());
}
List<model.Boat> boats = a_member.GetBoatList().GetBoats();
if (boats.Count > 0)
{
if (showBoats)
{
System.Console.WriteLine("Boats:");
foreach (model.Boat boat in boats)
{
DisplayBoat(boat);
}
}
else
{
System.Console.WriteLine("Boats: {0}", boats.Count);
}
}
}