private void hello()
 {
     //I can only call hello from inside this class.
     My_Other_CS_File other_File = new My_Other_CS_File();
     //you created this instance class here. It will only exist until "hello" finishes running, then it will disappear.
     string hello = "hi";
     //the only way to get the string hello to the class you created is to pass it.
     other_File.SayHello(hello);
     //other_file is done. It will disappear now if you want it again you will have to create a new instance
 }
Exemplo n.º 2
0
    private void Send_ToolStrip_Data_To_Instance_Class()
    {
        My_Other_CS_File other_File = new My_Other_CS_File();

        other_File.Act_On_ToolStrip_Item(checkForUpdatesToolStripMenuItem.Enabled);
    }