Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

exception

static void f2() {
    try {
       
    } catch(IndexOutOfRangeException) {
        Console.Write("B");
    }
    
}

answer:  Console.Write("B");
Comment

Exceptions

>>> 10 * (1/0)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ZeroDivisionError: division by zero
>>> 4 + spam*3
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'spam' is not defined
>>> '2' + 2
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: Can't convert 'int' object to str implicitly
Comment

PREVIOUS NEXT
Code Example
Csharp :: adding to a dictionary class c# 
Csharp :: dateTime first/last 
Csharp :: overridable method C# 
Csharp :: f# get last element of list 
Csharp :: wpf dispatcher timer is inaccurate 
Csharp :: get camera position unity 
Csharp :: float into int unoity 
Csharp :: csharp attributes as generics constraints 
Csharp :: Moq Unittest with ILogger 
Csharp :: Delayed respawn timer 
Csharp :: c#, get a embedded resx file 
Csharp :: Uninstall-SPSolution: This solution contains resources scoped for a Web application and must be retracted from one or more Web applications. 
Csharp :: blazor conditional reenreing 
Csharp :: nuget Microsoft.EntityFrameworkCore.InMemory": "1.0.0" 
Csharp :: gcm_sender_id convert text 
Csharp :: unity set dictionary value 
Csharp :: pcamera 
Csharp :: how to input message ox in c# 
Csharp :: psobject get service name 
Csharp :: how to edit a c# list 
Csharp :: pass viewbag using ienumerable 
Csharp :: back color for DateTimePicker control 
Csharp :: fluent api c# hasmany withmany 
Csharp :: Photon Join Room 
Csharp :: asp.netcore: develop on win10 run on ubuntu 
Csharp :: f sharp make parameter mutable 
Csharp :: c# check if file is zero bytes 
Csharp :: unity diference protected and virtual 
Csharp :: set teh screen rect of camera unity 
Csharp :: C# signup code 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =