'Item' property missing in C#

RS 5.12.02

The API Help shows that the ‘RibbonTabCollection’ class has ‘Item’ properties for C# and VB.
This VB code is OK:

Dim tab As RibbonTab = UIEnvironment.RibbonTabs.Item("Add-Ins") … but this C# code:

RibbonTab tab = UIEnvironment.RibbonTabs.Item["Add-Ins"]; … gives error message: 'ABB.Robotics.RobotStudio.Environment.RibbonTabCollection' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'ABB.Robotics.RobotStudio.Environment.RibbonTabCollection' could be found (are you missing a using directive or an assembly reference?)
If I view the ‘RibbonTabCollection’ class in the Microsoft Visual Basic 2008 Express Edition object browser the ‘Item(String)’ and ‘Item(Integer)’ properties are present.

If I view the ‘RibbonTabCollection’ class in the Microsoft Visual C# 2008 Express Edition object browser the ‘Item[String]’ and ‘Item[Integer]’ properties are missing.

The referenced ‘ABB.Robotics.RobotStudio.Environment.dll’ version is 5.12.3423.2040 in both cases.

Is this a bug in the API or in Visual Studio; or am I failing to understand something?

Thanks,

Kevin

Hi Kevin,

The Item syntax is only used in VB since it doesn’t support indexers. In C# it’s simply

RibbonTab tab = UIEnvironment.RibbonTabs["Add-Ins"]

regards,
Johannes

Thanks Johannes,

All is clear now.

Kevin