Ayúdanos a dar forma a GoConqr. ¿Qué deberíamos añadir?

Fichas

C# evolution matrix

Simi Sreedharan Inglés 4 fichas

C# evolution matrix

Fichas del conjunto (4)

  1. 1C# evolution MatrixC# evolution Matrix
  2. 2What is the use of exceptions in C#?To handle errors in a graceful easy to use manner
  3. 3What are exceptions?Exceptions are unforeseen errors that happen in your programs. For example, you can’t predict when you’ll receive a file I/O error, run out of system memory, or encounter a database error. These things are generally unlikely, but they could still happen and you want to be able to deal with them when they do occur. This is where exception handling comes in.
    Identifying the exceptions you’ll need to handle depends on the routine you’re writing. For example, if the routine opened a file with theSystem.IO.File.OpenRead() method, it could throw any of the following exceptions:
    SecurityException
    ArgumentException
    ArgumentNullException
    PathTooLongException
    DirectoryNotFoundException
    UnauthorizedAccessException
    FileNotFoundException
    NotSupportedException
    It’s easy to find out what exceptions a method can raise by looking in the .NET Frameworks SDK Documentation. Just go to the Reference/Class Library section and look in the Namespace/Class/Method documentation for the methods you use. The exception in the list above were found by looking at the OpenRead() method definition of the File class
  4. 4How do you handle exceptions in C#?by implementing a try/catch block. Code that could throw an exception is put in the try block and exception handling code goes in the catch block.

Información

Descripción
Fichas sobre C# evolution matrix, creado por Simi Sreedharan el 17/12/2016.
Creado por
Simi Sreedharan
Visitas
2
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué deberíamos añadir?