Visual Studio colors user-defined class differently in C# and in VB.net! RRS feed

  • Question

  • Hi all,

    I am using Visual Studio 2008. I have to convert a C# program to VB.net program. I find out Visual Studio treat the non-Microsoft class (or user defined class) differently in C# and in VB.net!

    In C#, the class EVTIADV_CenterTrigger_EventArgs is colored according to Tools -> Options -> Environment -> Fonts and Colors -> User Types. 

    void BRIReader_EventHandlerCenterTrigger(object sender, EVTADV_CenterTrigger_EventArgs EvtArgs)
       if (EVTADV_CenterTrigger_EventArgs.STATE.PULLED == EvtArgs.CenterTriggerState)

    In VB.NET, the class is colored as Identifier!

    Private Sub BRIReader_EventHandlerCenterTrigger(ByVal sender As Object, ByVal EvtArgs As EVTADV_CenterTrigger_EventArgs)
       If EVTADV_CenterTrigger_EventArgs.STATE.PULLED = EvtArgs.CenterTriggerState Then
       End If
    End Sub

    Why? I am using VS2008 in Windows 7.

    Monday, August 27, 2012 10:32 AM