NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

PropertyInfo.GetIndexParameters

Returns an array of all the parameters for the property.

[Visual Basic]
MustOverride Public Function GetIndexParameters() As ParameterInfo ()
[C#]
public abstract ParameterInfo[] GetIndexParameters();
[C++]
public: virtual ParameterInfo* GetIndexParameters() [] = 0;
[JScript]
public abstract function GetIndexParameters() : ParameterInfo[];

Return Value

Returns a ParameterInfo array containing the parameters for the indexes.

Remarks

Extract any required parameter information from the returned array.

To use the GetIndexParameters method, first get the class Type. From the Type, get the PropertyInfo. From the PropertyInfo, use the GetIndexParameters method.

Example [C#]

[C#]

//Make a property
public class Myproperty   
{
   private string caption = "A Default caption";
   public string Caption{
      get{return caption;}
      set {if(caption!=value) {caption = value;}
      }
   }
}

class Mypropertyinfo
{
   public static int Main()
      {
      Console.WriteLine ("\nReflection.PropertyInfo");

      //Get the type and PropertyInfo
      Type MyType = Type.GetType("Myproperty");
      PropertyInfo Mypropertyinfo = MyType.GetProperty("Caption");

      //Get the public GetIndexParameters Method
      ParameterInfo[] Myparameterinfoarray =
         Mypropertyinfo.GetIndexParameters();
      Console.Write ("\n" + MyType.FullName + "." + Mypropertyinfo.Name
         + " has " + Myparameterinfoarray.Count + " parameters");

      return 0;
   }
}

Produces the following output

Reflection.PropertyInfo
Myproperty.Caption has 0 parameters

See Also

PropertyInfo Class | PropertyInfo Members | System.Reflection Namespace