Without using string manipulation (checking for an occurrence of the . or , character) by casting the product of an int calculation to string.
.
,
Try
public bool IsDivisible(int x, int n) { return (x % n) == 0; }
The modulus operator % returns the remainder after dividing x by n which will always be 0 if x is divisible by n.
For more information, see the % operator on MSDN.