If there is only a set part in a Property, then is there any need to declare a return type?
For example:
public string Email
{
set { email = value; }
}
In the above example is there any need of the word “string” after public?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The simple answer is: It’s not possible to have a property without a type
Think that
valueis of the type that you specified so it’s not that it’s not being used.