Is there a way to create macros in c#
ex:
string checkString = “‘bob’ == ‘bobthebuilder'” (this will be dynamic)
if (@@checkString)
//………
else
//………
Thanks
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.
No, C# doesn’t have macros. You could capture your logic in a delegate and apply that delegate in multiple places, potentially… would that help?
If you could describe the problem you’re trying to solve rather than the solution you think you’d like, we may be able to help more.