PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Serialization Namespace / IArguments­Reader Interface / IArguments­Reader Methods / IArguments­Reader.​Try­Get­Value(T) Method

IArgumentsReader.TryGetValue<T> Method

Attempts to read a value from the collection, and does not throw an exception if the value does not exist.

Namespace:  PostSharp.Serialization
Assembly:  PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
bool TryGetValue<T>(
	string name,
	out T value,
	string scope = null
)

Parameters

name
Type: System.String
Argument name.
value
Type: T
At output, set to the value of the argument named name in the given optional scope.
scope (Optional)
Type: System.String
An optional prefix of name, similar to a namespace.

Type Parameters

T
Value type.

Return Value

Type: Boolean
true if the value is defined, otherwise false.
See Also