Attachment.Name 속성

정의

이 첨부 파일과 연결된 콘텐츠 형식의 MIME 콘텐츠 형식 이름 값을 가져오거나 설정합니다.

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
public string? Name { get; set; }
public string Name { get; set; }
member this.Name : string with get, set
Public Property Name As String

속성 값

String 속성이 나타내는 콘텐츠 형식 name의 값이 들어 있는 Name입니다.

예외

Set 작업에 대해 지정된 값이 null입니다.

set 작업에 지정된 값이 Empty("")인 경우

예제

다음 코드 예제에서는 첨부 파일에 대 한 정보를 표시 하는 방법을 보여 줍니다.

static void DisplayFileAttachment( Attachment^ a )
{
   Console::WriteLine( L"Content Disposition {0}", a->ContentDisposition );
   Console::WriteLine( L"Content Type {0}", a->ContentType );
   Console::WriteLine( L"Name {0}", a->Name );
}
public static void DisplayFileAttachment(Attachment a)
{
    Console.WriteLine("Content Disposition {0}", a.ContentDisposition.ToString());
    Console.WriteLine("Content Type {0}", a.ContentType.ToString());
    Console.WriteLine("Name {0}", a.Name);
}

설명

속성은 Name 이 첨부 파일에 대해 생성된 Content-Type 헤더에 사용됩니다. 첨부 Name 파일이 있는 전자 메일이 수신되면 가 첨부 파일의 이름으로 표시됩니다. Content-Type 헤더의 구문을 자세히 설명하는 문법은 RFC 2045 섹션 5.1에 설명되어 있습니다. RFC 2046은 MIME 미디어 형식 및 해당 매개 변수에 대한 자세한 정보를 제공합니다. 이러한 RFC는 에서 https://www.ietf.org/사용할 수 있습니다.

적용 대상