Parameter ListTry Get Value(String, Parameter) Method
Get the parameter with the specified name.
Definition
Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
if the parameter exists; otherwise, .
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public bool TryGetValue(
string name,
out Parameter?? param
)Parameters
Return Value
Booleanif 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
| ArgumentNullException | name is . |