Share via


CodeModel.IsCaseSensitive Property

Definition

Gets whether the current language is case-sensitive.

public:
 property bool IsCaseSensitive { bool get(); };
public:
 property bool IsCaseSensitive { bool get(); };
[System.Runtime.InteropServices.DispId(17)]
public bool IsCaseSensitive { [System.Runtime.InteropServices.DispId(17)] get; }
[<System.Runtime.InteropServices.DispId(17)>]
[<get: System.Runtime.InteropServices.DispId(17)>]
member this.IsCaseSensitive : bool
Public ReadOnly Property IsCaseSensitive As Boolean

Property Value

A Boolean value indicating true if the current language is case-sensitive; false if otherwise.

Attributes

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);  
}  

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

Applies to