Method GetInt
- Namespace
- Innova.NLogExtensions
- Assembly
- Innova.NLogExtensions.dll
GetInt(LogEventInfo, string)
Gets the integer value associated with the specified key from the log event's properties.
public static int? GetInt(this LogEventInfo logEvent, string key)
Parameters
logEvent
LogEventInfoThe log event.
key
stringThe key of the property.
Returns
- int?
The integer value associated with the key, or null if the key is not found or the value is not a valid integer.