top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Write down the C# syntax to catch exception?

+3 votes
252 views
Write down the C# syntax to catch exception?
posted Nov 28, 2014 by Manikandan J

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

To catch an exception, we use try catch blocks. Catch block can have parameterof system.Exception type.

[csharp]

GetAllData();

catch(Exception ex)

}[/csharp]

In the above example, we can omit the parameter from catch statement.

answer Nov 28, 2014 by Jdk
Similar Questions
+2 votes

write c# code about AVL tree contains :
1. add node
2. delete node
3. balance
4. replace node
and then print nodes from left leave !

0 votes

I am using dynamic keyword to deserailize my JSON Object. But I am getting error "Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create".

dynamic userId = JValue.Parse(responseLine);

I have added Mycrosoft,CSharp.dll reference also in the project but no luck.

Let me know what I am missing.

...