Click or drag to resize
MimeKit

ParameterListTryGetValue Method (String, Parameter)

Get the parameter with the specified name.

Namespace:  MimeKit
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public bool TryGetValue(
	string name,
	out Parameter param
)

Parameters

name
Type: SystemString
The parameter name.
param
Type: MimeKitParameter
The parameter.

Return Value

Type: Boolean
true if the parameter exists; otherwise, false.
Exceptions
ExceptionCondition
ArgumentNullExceptionname is null.
Remarks
Gets the parameter with the specified name.
Examples
C#
// Some versions of Outlook expect the rfc2047 style of encoding for the filename parameter value.
if (part.ContentDisposition.Parameters.TryGetValue ("filename", out var parameter))
    parameter.EncodingMehod = ParameerEncodngMethod.Rfc2047;
See Also