I need to get the simple fraction of a decimal number in c#
Example:
$1$ would be $\frac11$, $16$ would be $\frac{16}{1}$, $0.125$ would be $\frac{1}{8}$, $0.30769231$ would be $\frac{4}{13}$
I'm going to use this operation in code but i need to know the process to the get the fraction with integer numbers...