hello all i have two main classes one form class and one class that is going to act as fake host on a network.
the first class just uses glade to control some buttons and a text box on a form, and the second class at the moment does very little. the problem i have is this:
when i start the program i want the first class to create an instance of the other class like this:
host a = new host();
this works fine however, i cant destroy the object once i have created it without closing the application and restarting it this is the code to my second class:
Code:
using System;
namespace learning_bridge {
public class host {
// define variables
public string name = "";
public int connected;
private const int MAX_TTL = 120;
private int TTL = 0;
private Random rndConnected = new Random();
private enum port { ONE, TWO }
// end variable definitions
public host( string newName ) {
name = newName;
connected = rndConnected.Next( 1, 6 );
}
public void Dispose() {
}
}
the first class creates this class file after the public class function using host a = new host(); it is important to leave this code here. i just need to know how to dispose of class files,
thanks trscookie.