I am displaying three text box, which get only numbers. User may enter value in one text box or two or three in any order. I want to calculate the average of value entered in those text boxes in C#.
For example. if any one text box contain values, average must be calculate based on 1 (value/1).
if two text box contain values, average must be calculate with 2 (value1+value2)/2
if three text boxes contain values, average must be calculate with 3 (value1+value2+value3)/3.
any one know how to achieve this with less code?