This documentation is archived and is not being maintained.

CodeFunction.IsOverloaded Property

Gets whether or not a function is overloaded.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

bool IsOverloaded { get; }

Property Value

Type: System.Boolean
A Boolean value indicating true if a function is overloaded; false if otherwise.


The values of code model elements such as classes, structs, functions, attributes, delegates, and so forth can be non-deterministic after making certain kinds of edits, meaning that their values cannot be relied upon to always remain the same. For more information, see the section Code Model Element Values Can Change in Discovering Code by Using the Code Model (Visual Basic).

 public void IsOverloadedExample(DTE2 dte)
    // Before running this example, open a code document from a project
    // and place the insertion point inside a function.
        // Retrieve the CodeFunction at the insertion point.
        TextSelection sel = 
        CodeFunction fun = 
        string ovrloads = "";

        if (fun.IsOverloaded)
            // Display all the overloads.
            foreach (CodeFunction ovrload in fun.Overloads)
                ovrloads += 
                    (int)(vsCMPrototype.vsCMPrototypeParamNames | 
                    vsCMPrototype.vsCMPrototypeParamTypes | 
                    vsCMPrototype.vsCMPrototypeType)) + "\n";

            MessageBox.Show(fun.Name + 
                " has the following overloads:\n\n" + ovrloads);
            MessageBox.Show(fun.Name + " isn't overloaded.");
    catch (Exception ex)