S
Steven
In C++ you can have an optional param by doing something like this:
int GetIndex(POINT pt, RECTANGLE* pRect)
{
....
if(pRect != NULL)
{
pRect->left = 0;
...
}
return Index;
}
RECTANGLE rect;
int nIndex = GetIndex(pt, &rect);
nIndex = GetIndex(pt, NULL);
How do you do that in C#? or can you?
int GetIndex(Point pt, ref Nullable Rectangle rect)
doesn't quite work. Is there a way to do this? I won't
always need the extra piece of information.
Thanks,
Steven
int GetIndex(POINT pt, RECTANGLE* pRect)
{
....
if(pRect != NULL)
{
pRect->left = 0;
...
}
return Index;
}
RECTANGLE rect;
int nIndex = GetIndex(pt, &rect);
nIndex = GetIndex(pt, NULL);
How do you do that in C#? or can you?
int GetIndex(Point pt, ref Nullable Rectangle rect)
doesn't quite work. Is there a way to do this? I won't
always need the extra piece of information.
Thanks,
Steven