Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

get type of exception c#

try
{
    // do something here
}
catch(Exception ex)
{
	// will print System.NullReferenceException for example
    Console.WriteLine(ex.GetType().ToString());
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to check if list index is out of range in c# 
Csharp :: c# download file 
Csharp :: unity c# reference link url 
Csharp :: unity create button with parameter 
Csharp :: assign datasource to dropdownlist in c# 
Csharp :: scaffold db ef core 
Csharp :: unity get direction from one point to another 
Csharp :: c# start as adminstrator 
Csharp :: UnityEngine.Transform.get_position () (at <a0ef933b1aa54b668801ea864e4204fe:0) Gamekit3D.MeleeWeapon.BeginAttack (System.Boolean thowingAttack) 
Csharp :: unity keep rotating object 
Csharp :: change image source wpf 
Csharp :: add items to listbox from text file c# 
Csharp :: maxheap c# 
Csharp :: remove last character from string c# 
Csharp :: unity input.getkeyup not working 
Csharp :: c# declare inline string array 
Csharp :: c# cmd 
Csharp :: base64 string to byte array c# 
Csharp :: loan calculator using windows forms in c# code 
Csharp :: set label position winforms 
Csharp :: how to do fizzbuzz in c# 
Csharp :: .net: setting max size for sql parameter 
Csharp :: Tower of Hanoi c# 
Csharp :: c# split string for all blank character 
Csharp :: net use delete 
Csharp :: c# shuffle array 
Csharp :: c# clear a textbox 
Csharp :: model in bootsrap 4 
Csharp :: cs entity framework 
Csharp :: unity custom update 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =