Nate Bross
Contributor
I have an object (sprite) and I have a method called inkCF, or incriment current frame.
My issue is that when I try to call the method, either of these two ways
I get the following error
Only assignment, call, increment, decrement, and new object expressions can be used as a statement.
When I used the MSDN help it didn't really help me. I'm new to C#, and the same method worked in Visual Basic without error.
Using.....C# 2005
C#:
public void inkCF()
{
if ((iCurrentFrame + 1)< (iNumFrames))
{
iCurrentFrame += 1;
}
else
{
iCurrentFrame = 1;
}
}
My issue is that when I try to call the method, either of these two ways
C#:
MyClass x;
x.inkCF;
//Or, This, inside of another sub in the class
code...
inkCF;
code....
I get the following error
Only assignment, call, increment, decrement, and new object expressions can be used as a statement.
When I used the MSDN help it didn't really help me. I'm new to C#, and the same method worked in Visual Basic without error.
Using.....C# 2005