percentage in c#

C#
number = (percentage / 100) * totalNumber;percentage = (yourNumber / totalNumber) * 100;
Source

Also in C#: