unity csharp catch index out or range exception

Code Example - unity csharp catch index out or range exception

                
                        catch (System.IndexOutOfRangeException ex){
  //Do this if exception is thrown
}