Exemple #1
0
        // Show the relationships a person is involved in
        private static void ShowPerson(string name)
        {
            GraphNode n = rg.GetNode(name);

            if (n != null)
            {
                Console.Write(n.ToString());
            }
            else
            {
                Console.WriteLine("{0} not found", name);
            }
        }
Exemple #2
0
        }                                                                                // the main function of Program.cs has finished executing

        private static void ShowPerson(string name)                                      // Show the relationships a person is involved in
        {
            GraphNode n = rg.GetNode(name);                                              // create a graphnode variable for name

            if (n != null)                                                               // check that the name is valid
            {
                Console.Write(n.ToString());                                             // write the name and its relationships to the console
            }
            else                                                                         // if the name wasn't valid
            {
                Console.WriteLine("{0} not found", name);                                // write that the name wasn't valid to the console
            }
        }