Click or drag to resize
MimeKit

ParameterListTryGetValue(String, Parameter) Method

Get the parameter with the specified name.

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

Parameters

name  String
The parameter name.
param  Parameter
The parameter.

Return Value

Boolean
true if the parameter exists; otherwise, false.
Exceptions
ExceptionCondition
ArgumentNullExceptionname is null.
Remarks
Gets the parameter with the specified name.
Example
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