本文整理匯總了C#中School.Student.RemoveComment方法的典型用法代碼示例。如果您正苦於以下問題:C# Student.RemoveComment方法的具體用法?C# Student.RemoveComment怎麽用?C# Student.RemoveComment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類School.Student
的用法示例。
在下文中一共展示了Student.RemoveComment方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Main
static void Main(string[] args)
{
Student student1 = new Student("Kiril", 13);
student1.AddComment("Test comment1 for student 1");
student1.AddComment("Test comment2 for student 1");
Student student2 = new Student("Vasil", 25);
student2.AddComment("Test comment1 for student 2");
student2.AddComment("Test comment2 for student 2");
student1.RemoveComment("Test comment1 for student 1");
student1.DisplayComments();
student2.ClearComments();
student2.DisplayComments();
student1.AddComment("Blah blah");
Console.WriteLine(student1.CommentsCount);
student1.RemoveCommentAt(0);
student1.DisplayComments();
Discipline discipline1 = new Discipline("Discrete Mathematics", 1, 1);
Discipline discipline2 = new Discipline("Mathematical Analysis", 1, 1);
Discipline discipline3 = new Discipline("OOP", 2, 3);
discipline1.AddComment("Introduction do discrete data structures.");
discipline3.AddComment("Object Oriented Programming in C#");
Teacher teacher1 = new Teacher("Trifon",
new List<Discipline>() { discipline1 });
Teacher teacher2 = new Teacher("Grigor",
new List<Discipline>() { discipline2, discipline3 });
Class class1 = new Class("312",
new List<Teacher>() { teacher1, teacher2} ,
new List<Student>() { student1, student2} );
School school = new School(new List<Class>() { class1 });
}