Okay, so still very new to C#, so sorry if this is obvious...
There is some code I can't follow that was created by someone who is much better at C#than I am.
We have a class, call it "CC", and it has a number of fields, one of which is "FORM_NBR".
So, in a nutshell:
public class CC
{
public CC();
//Many, many fields...
...
public long FORM_NBR { get; set; }
...
}
At some point, an object is created...
CC c = new CC();
and then this line is called:
c.FORM_NBR = c.FORM_NBR.GetCheckDigit(' ');
Now, there is this function deep in the library we inherited:
public static short GetCheckDigit(this long nFormNbr, char chFormTypCd)
{
short nCkDgt = 0; // Default to 0
switch (chFormTypCd)
{
//Many, many cases...
...
default:
nCkDgt = CalculateCheckDigit(nFormNbr);
break;
}
return nCkDgt;
}
My question is this. Being new-ish to C#, how is GetCheckDigit getting called from a long? What is this syntax?
I don't even know how I would describe/google this!