string txtnumber = txtNumber.Text.Replace(" ",""); string[] nums = txtnumber.ToCharArray(); int val=0; for(int i=0; i< nums.Length; i++) { val += ((int)(nums[i]-'0'))*WEIGHT[i]; }
int sum = 0; sum = sum + Convert.ToInt32(textbox.text.Substring(0,1))*10; // continue with other digits, watching out for the spaces int remainder = sum % 11; // modulo operator is % in C#
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)