From ce783e6921d30ba6867254d65a652cd5a8d1c1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marie=20P=C3=ADchov=C3=A1?= <11718369+ManickaP@users.noreply.github.com> Date: Tue, 10 Feb 2026 09:59:12 +0100 Subject: [PATCH] Update MailAddress.xml with constructor details Clarify behavior of MailAddress constructor regarding displayName and encoding. Fixes https://github.com/dotnet/runtime/issues/57014 --- xml/System.Net.Mail/MailAddress.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xml/System.Net.Mail/MailAddress.xml b/xml/System.Net.Mail/MailAddress.xml index 4ead79a9a4d..ca401e1224a 100644 --- a/xml/System.Net.Mail/MailAddress.xml +++ b/xml/System.Net.Mail/MailAddress.xml @@ -261,6 +261,8 @@ If `displayName` contains non-ASCII characters, the iso-8859-1 character set is If `address` contains a display name, and `displayName` is not `null` and is not equal to , `displayName` overrides the value specified in `address`. +The constructor does not check if the `displayName` parameter is valid. This method removes surrounding quotes not displayed by the property. Quotes will be added before transmission. encoding will be applied to the property before transmission. + ## Examples The following code example uses this constructor to create instances for the sender and recipient of an email message.