Default.Graph.ReturnVfirst C# (CSharp) Method

ReturnVfirst() public method

public ReturnVfirst ( ) : Vertex
return Vertex
	public Vertex ReturnVfirst() {
		return(Vfirst);
	}
	

Usage Example

Ejemplo n.º 1
0
        public static int Main()
        {
            Graph.flag = false;
            exitCode   = 100;

            Console.WriteLine("Test should pass with ExitCode 100");
            Console.WriteLine("Building Graph with 100 vertices...");
            Graph MyGraph = new Graph(100);

            MyGraph.BuildGraph();
            MyGraph.CheckIfReachable();

            Console.WriteLine("Deleting all vertices...");

            MyGraph.DeleteVertex();

            GC.Collect();
            GC.WaitForPendingFinalizers();

            Vertex temp = MyGraph.ReturnVfirst();

            GC.KeepAlive(temp); // will keep alive the graph till here

            Console.WriteLine("Done...");
            Graph.flag = true;  // to check if finalizers ran at shutdown or earlier
            return(exitCode);
        }
All Usage Examples Of Default.Graph::ReturnVfirst