I was trying to find the anomolies in the below code but i couldn’t find anything except bad naming convention.
public static Response DoIt(ADUser user)
{
string search = "(cn=" + user.name.Trim() + ")";
// More code lines
}
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.
Its not returning an
Responsetype object, other than that it is fine. You may replace strings in double quotes ("(cn=") with constant if you are using it in more than one place. If you are worried about concatenation of string in a single line, then it is OK. But if you need to concatenate stringsearchwithin a loop or something that requires to much concatenation then you may consider using StringBuilder to build your string.