Share via


CodeModel2.IsCaseSensitive Property

Gets a value indicating whether the current language is case-sensitive.

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

Syntax

'Declaration
ReadOnly Property IsCaseSensitive As Boolean
'Usage
Dim instance As CodeModel2 
Dim value As Boolean 

value = instance.IsCaseSensitive
bool IsCaseSensitive { get; }
property bool IsCaseSensitive {
    bool get ();
}
function get IsCaseSensitive () : boolean

Property Value

Type: System.Boolean
A Boolean that is true if the current language is case-sensitive; otherwise, false.

Implements

CodeModel.IsCaseSensitive

Remarks

Note

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).

Examples

Sub IsCaseSensitiveExample(ByVal dte As DTE2)

    ' Before running this example, open a solution that contains one 
    ' or more projects.
    Dim msg As String
    Dim proj As Project
    For Each proj In dte.Solution.Projects
        If proj.CodeModel.IsCaseSensitive Then
            msg &= proj.Name & " uses a case-sensitive language" & _
                vbCrLf
        Else
            msg &= proj.Name & " uses a case-insensitive language" & _
                vbCrLf
        End If
    Next

    ' Display the case-sensitivity of the solution's projects.
    MsgBox(msg)

End Sub
public void IsCaseSensitiveExample(DTE2 dte)
{
    // Before running this example, open a solution that contains one 
    // or more projects.
    string msg = "";
    foreach (Project proj in dte.Solution.Projects)
    {
        if (proj.CodeModel.IsCaseSensitive)
            msg += proj.Name + " uses a case-sensitive language" + 
                Environment.NewLine;
        else
            msg += proj.Name + " uses a case-insensitive language" + 
                Environment.NewLine;
    }

    // Display the case-sensitivity of the solution's projects.
    MessageBox.Show(msg);
}

.NET Framework Security

See Also

Reference

CodeModel2 Interface

CodeModel2 Members

IsCaseSensitive Overload

EnvDTE80 Namespace

Other Resources

How to: Compile and Run the Automation Object Model Code Examples

Discovering Code by Using the Code Model (Visual Basic)

Discovering Code by Using the Code Model (Visual C#)