PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Custom Namespace / Logging­Properties­Expression­Model Structure / Logging­Properties­Expression­Model Methods / Logging­Properties­Expression­Model.​Get­Int32 Method

LoggingPropertiesExpressionModel.GetInt32 Method

Gets the value of a logging property as an Int32, or defaultValue if the property does not exist. Throws an exception if the property exists but can't be converted to Int32 using ToInt32(Object).

Namespace:  PostSharp.Patterns.Diagnostics.Custom
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
public int GetInt32(
	string property,
	int defaultValue = 0


Type: System.String
Name of a logging property.
defaultValue (Optional)
Type: System.Int32
The default value to return if the property does not exist.

Return Value

Type: Int32
See Also