ParameterListTryGetValue(String, Parameter) Method

Get the parameter with the specified name.

Definition

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

Parameters

name  String
The parameter name.
param  Parameter
The parameter.

Return Value

Boolean
if the parameter exists; otherwise, .

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.EncodingMethod = ParameterEncodingMethod.Rfc2047;
                  

Exceptions

See Also