Hello, i have this code:
Nodo N;  
        foreach (string S in listBox_nodos.Items)  
        {  
            N = graph.getNodoName(S);  
            string comp = (string) listBox_nodos.SelectedItem;  
            if (comp == S)  
               System.Console.WriteLine(N.NAME);  
        }  
I get InvalidOperationException and the application crashes.
Cant get why. Any help? thanks  
EDIT: The 'N.NAME' prints! And then goes the crash.
EDIT2: I've tried to catch the Exception, the application crashes anyway