There is a form class: Form1:
namespace
tapTCPports_1{
Public class Form1 : System.Windows.Forms.Form
{
.........
private static void ConvIPtoLong (string strIP)
{
...... // some code that compiles
}
public void button1_Clicked (Object sender, EventArgs e)
{
// al I want to do here is to use the function
// (method) that I just defined: ConvIPtoLong
// and I get an error no matter how I reference it
this.ConvIPtoLong ("198.28.87.221")
// the compiler cannot find it in the class Form1
}
}
}
I also tried to place a statement at the beginning of the class Form1:
private System.Windows.Forms.AccessibleObject convIPtoLong;
Then I get an error message pointing to the convIPtoLong function definition that this object has already been defined previously.
You see, I do not understand something very basic in C# and cannot go any further until it is resolved. Please, help.
Thanks.

How to address a function?
Robert Schlabbach
You should be able to just call it from a method inside the class like this:
ConvIPToLong("192.168.0.0")
le_beluet
try:
Form1.ConvIPtoLong ("198.28.87.221");
Dale17677
Thanks, it worked.