Hi all!i have a constructor like this:
public void Write(byte[] WriteBytes)
{
}
i want to call it as a function to the Main.How am i going to call it?Thanks!
How to call function?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

kuhajeyan3 pointsPosted Aug 5, 2005, 2:26 AM EDT
Mihir Solanki18 pointsPosted Aug 5, 2005, 3:53 AM EDT
Well ofcourse you cannot call constructor directly but you can workaround something like this
class Write {public
public Write(byte[] WriteBytes) {
Write_Internal(WriteBytes);
}
public void Write_Internal(byte[] WriteBytes){ // write something}
public void Main(){ byte[] data = new byte[3];Write w =
new Write(data); // if needed you can again call // but not constructorw.Write_Internal(data);
}
}