Trying to create a new instance of the "MortgageData" object.
Professor said to use:
ClassName InstanceName = New ClassName(arg1, arg2, arg3, arg4);
I Used
MortgageData somethingsomething = New MortgageData(ID,principal,apr,term);
Keep getting Error CS1002: ; Expected with the class name after new underlined in red. I'm using visual studio 2008.
Not sure what to do.
For a start, write new
instead of New
. C# keywords are case-sensitive, and always in lower-case!
There's already an accepted, correct answer but I would like to add a general point here:
When you get an <x> expected error don't put too much faith in it. Something is wrong there but if you don't see an obvious case of omitting whatever it's asking for start looking for other things that could have confused the parser, especially unrecognized keywords.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With