Ajude a dar forma ao GoConqr. O que a gente deve adicionar?

Flashcards

C# evolution matrix

Simi Sreedharan Inglês 4 flashcards

C# evolution matrix

Flashcards do 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.

Informações

Descrição
FlashCards sobre C# evolution matrix, criado por Simi Sreedharan em 17-12-2016.
Criado por
Simi Sreedharan
Visualizações
2
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que a gente deve adicionar?