In a recent interview I had this question.
Whats the error here? I know enough c# but I cant see an error. Can you?
Class x {
protected string t1;
public int t2;
}
Class y : x {
}
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.
Well in terms of errors, we could start with
Classinstead ofclass. In terms of bad practice, virtually every line of it is a bad idea in my view:Basically, the types
stringandintare okay here – but every other non-whitespace, non-symbolic token would need changing before I let this into a codebase…