Missing 클래스

정의

누락된 Object를 나타냅니다. 이 클래스는 상속될 수 없습니다.

public ref class Missing sealed
public ref class Missing sealed : System::Runtime::Serialization::ISerializable
public sealed class Missing
public sealed class Missing : System.Runtime.Serialization.ISerializable
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class Missing : System.Runtime.Serialization.ISerializable
type Missing = class
type Missing = class
    interface ISerializable
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type Missing = class
    interface ISerializable
Public NotInheritable Class Missing
Public NotInheritable Class Missing
Implements ISerializable
상속
Missing
특성
구현

예제

다음 예제에서는 사용 하는 방법에 설명 합니다 Missing 개체를 호출 하 여 기본 인수를 사용 하 여 메서드를 리플렉션합니다.

using System;
using System.Reflection;

[assembly:CLSCompliant(true)]

public class MissingClass
{
   public static void MethodWithDefault(int value = 33)
   {
      Console.WriteLine("value = {0}", value);
   } 
}

public class Example
{
   public static void Main()
   {
      // Invoke without reflection
      MissingClass.MethodWithDefault();
      
      // Invoke by using reflection.
      Type t = typeof(MissingClass);
      MethodInfo mi = t.GetMethod("MethodWithDefault");
      mi.Invoke(null, new object[] { Missing.Value });
   }
}
// The example displays the following output:
//       value = 33  
//       value = 33
Imports System.Reflection

<Assembly:CLSCompliant(True)>

Public Class MissingClass
   Public Shared Sub MethodWithDefault(Optional value As Integer = 33)
      Console.WriteLine("value = {0}", value)
   End Sub 
End Class   

Public Module Example
   Public Sub Main()
      ' Invoke without reflection.
      MissingClass.MethodWithDefault()
      
      ' Invoke by using reflection.
      Dim t As Type = GetType(MissingClass)
      Dim mi As MethodInfo = t.GetMethod("MethodWithDefault")
      mi.Invoke(Nothing, { Missing.Value })
   End Sub
End Module
' The example displays the following output:
'       value = 33 
'       value = 33

설명

클래스는 Missing 일반적으로 리플렉션을 사용할 때 기본 인수를 사용하여 메서드를 호출하는 데 사용됩니다.

필드에 의해 Value 반환되는 의 Missinginstance 하나만 존재합니다.

필드

Value

Missing 클래스의 유일한 인스턴스를 나타냅니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

SerializationInfo 개체의 유일한 인스턴스를 다시 만드는 데 필요한 논리 컨텍스트 정보를 사용하여 Missing 개체를 설정합니다.

적용 대상

추가 정보