Is there a way I can check Integers if they contain a certain number in C#?
For example:
I want to check for 7. When I enter 17, the code will return 1. When I enter 28, the code will return 0.
Thank You
int number = 17;
int digit = 7;
bool result = number.ToString().Contains(digit.ToString());