Class ResultWithExceptionDC<T>
- Namespace
- SunamoDevCode._public
- Assembly
- SunamoDevCode.dll
Wraps a result value of type T together with an optional exception message.
public class ResultWithExceptionDC<T>
Type Parameters
TType of the result data.
- Inheritance
-
ResultWithExceptionDC<T>
- Inherited Members
- Extension Methods
Constructors
ResultWithExceptionDC()
Initializes an empty result with default values.
public ResultWithExceptionDC()
ResultWithExceptionDC(Exception)
Initializes a new result from an exception, extracting its text.
public ResultWithExceptionDC(Exception exc)
Parameters
excExceptionException to extract text from.
ResultWithExceptionDC(string)
Initializes a new result with an exception message string.
public ResultWithExceptionDC(string exc)
Parameters
excstringException message text.
ResultWithExceptionDC(T)
Initializes a new result with the specified data.
public ResultWithExceptionDC(T data)
Parameters
dataTResult data value.
Properties
Data
Gets or sets the result data.
public T Data { get; set; }
Property Value
- T
Exc
Gets or sets the exception message if the operation failed.
public string Exc { get; set; }