Checking To Make Sure My Object isn't Partially Initialized
<p>I'm creating a simple application that takes a URL and a String and create the code for a hyperlink.</p>

<p>Here is my HyperLink Class</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

 namespace LinkIt_
{
class HyperLink
{
    private string url;
    private string text;

    public HyperLink()
    {

    }

    public HyperLink(string url,string text)
    {
        this.Website = url;
        this.Text = text;
    }


    public String Website
    {
        get
        {
            return url;
        }
        set
        {
            if (String.IsNullOrEmpty(value))
            {
                throw new ArgumentNullException("Must have URL!");
            }

            this.url = value;
        }


    }

    public String Text
    {

        get
        {
            return text;
        }

        set
        {
            if (String.IsNullOrEmpty(value))
            {
                throw new ArgumentNullException("Must have Text!");
            }
            this.text = value;
        }



    }

    public string addPoint()
    {

        return String.Format("&lt;li&gt;&lt;a href=" + "\" {0} \"&gt;", url) + text + "&lt;/a&gt;&lt;/li&gt;";  
    }

    public override string ToString()
    {

        return String.Format("&lt;a href=" + "\" {0} \"&gt;",url) + text + "&lt;/a&gt;" ;   
    }



           }
       }
</code></pre>

<p>Here is my Form Class</p>

<pre><code>using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

 namespace LinkIt_
 {
        public partial class Form1 : Form
{


    public Form1()
    {
        InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
        HyperLink link;
            try
            {

                if (chkPoint.Checked)
                {

                    txtDisplay.Text = "";
                    link = new HyperLink(txtLink.Text, txtText.Text);
                    txtDisplay.Text = link.addPoint();


                }
                else
                {
                    txtDisplay.Text = "";
                    link = new HyperLink(txtLink.Text, txtText.Text);
                    txtDisplay.Text = link.ToString();

                }



            }


            catch (ArgumentNullException msg)
            {
                MessageBox.Show(msg.Message);
            }





   }




    private void btnClear_Click(object sender, EventArgs e)
    {
        txtDisplay.Text = "";
        txtLink.Text = "";
        txtText.Text = "";
    }
}
 }
</code></pre>

<p>My Question:</p>

<ol>
<li><p>How do I make sure that I don't create a partially initialized object? </p></li>
<li><p>If my code need correcting, Could someone help me ?</p></li>
</ol>
