CellsException.Code
CellsException.Code property
Represents custom exception code.
public ExceptionType Code { get; }
Examples
using System;
using Aspose.Cells;
namespace AsposeCellsExamples
{
public class CellsExceptionPropertyCodeDemo
{
public static void Run()
{
try
{
// Create a workbook and try to access a non-existent worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets["NonExistentSheet"];
}
catch (CellsException e)
{
// Demonstrate usage of the Code property
Console.WriteLine($"Error Code: {e.Code}");
Console.WriteLine($"Error Message: {e.Message}");
}
}
}
}
See Also
- enum ExceptionType
- class CellsException
- namespace Aspose.Cells
- assembly Aspose.Cells