System.Reflection.Missing is a special class dedicated to represent the Missing parameter in VB6.
This class defined a static field Missing.Value to represent the sole instance of this class. Each time you have to use Missing object, you can only refer to this static value, and can not create any new instances. If you are aware of the Singleton pattern, you will understand that.
The Missing object is useful and necessary when you want to communicate with the legacy COM components. Here is a trivial example:
The following sinppet will call the Microsoft WebBrowser control to navigate to www.sina.com:
object missing = System.Reflection.Missing.Value;
this.axWebBrowser1.Navigate("http://www.sina.com", ref missing, ref missing, ref missing, ref missing);
If you wanna ignore passing the rest arguments in the Navigate method except for the first one, you have to use the Missing value, instead of null or any other C# value.
This class defined a static field Missing.Value to represent the sole instance of this class. Each time you have to use Missing object, you can only refer to this static value, and can not create any new instances. If you are aware of the Singleton pattern, you will understand that.
The Missing object is useful and necessary when you want to communicate with the legacy COM components. Here is a trivial example:
The following sinppet will call the Microsoft WebBrowser control to navigate to www.sina.com:
![](/Images/OutliningIndicators/None.gif)
![](/Images/OutliningIndicators/None.gif)
If you wanna ignore passing the rest arguments in the Navigate method except for the first one, you have to use the Missing value, instead of null or any other C# value.