Need help in method parameter type in C#.net
<p>i have a method say for student fee collection, in that there are three parameter studid,feeamount, collection date. method defination is like below.</p>

<pre><code>public string CollectFee(string studentid, decimal feeamount, DateTime collectiondate)
{
}
</code></pre>

<p>In this while calling this method from presentation layer..user must have to have enter all the parameter if any of the parameter is missing he will get message like....studentid and feeamount and  collection date is required. i want to check these while impleting the CollectFee method, since the method parameter having string, decimal, datetime datatype, how can i check empty or not for these in one if condition. </p>

<p>To achieve this i have written this code i am not sure whether its correct or not:</p>

<pre><code>public class Student
{ 
public string FeesCollection(string studentid, decimal feesamount, DateTime collectiondate)
{
    string Result = string.Empty;
    if (studentid == string.Empty || feesamount == 0 || collectiondate == DateTime.MinValue)        
    {
        Result = "Required fields are empty.";
    }
    else
    {
        Result = "Success.";
    }
    return Result;
}
</code></pre>

<p>}</p>

<p>while calling this from GUI layer i have written this code:</p>

<pre><code>protected void BtnAdd_Click(object sender, EventArgs e)
{
    Student obj = new Student();
    string studentid = TxtStdId.Text;
    decimal collectionamount = 0.0m;
    if (txtCollectionAmount.Text !=null)
    {
       collectionamount = Convert.ToDecimal(txtCollectionAmount.Text);
    }
    DateTime collectiondate = Convert.ToDateTime(txtCollectionDate.Text);           
    lblResult.Text=obj.FeesCollection(studentid, collectionamount, collectiondate);

}
</code></pre>

<p>But while testing the invalid condtion like keeping amounttextbox or datetimetextbox empty
getting exception like <strong>input string is not in correct format.</strong> any help pls.</p>
