property prob

  • Thread starter Thread starter ichor
  • Start date Start date
I

ichor

hi


public string LastName()
{
get //ERROR HERE
{
return this.lastName;
}
}
this code gives me a compilation error.
says


: ; expected

what am i doing wrong.?
 
You are mixing a method and property. Properties dont need () - get rid of
them :)

Kevin Cunningham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top