Check out example codes for "c# throw new exception". It will help you in understanding the concepts better.

Code Example 1

static void CopyObject(SampleClass original)
{
    if (original == null)
    {
        throw new System.ArgumentException("Parameter cannot be null", "original");
    }
}

Learn ReactJs, React Native from akashmittal.com