Throw index out of range csharp

Code Example - Throw index out of range csharp

                
                        throw new IndexOutOfRangeException("Error message!");