what is the alternative for Left function in c#
i have this in
Left(fac.GetCachedValue("Auto Print Clinical Warnings").ToLower + " ", 1) == "y");
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.
It sounds like you’re asking about a function
that will return the leftmost
leftcharacters of the strings. In that case you can just useString.Substring. You can write this as an extension method:and use it like so:
For your specific example: