criticaldiamonds criticaldiamonds - 11 months ago 79
C# Question

associate tabcontrol tab with string

I have an application that uses a TabControl to hold a RichTextBox. The user has the ability to open more tabs as they wish.

I need a way to associate each tab with a string, so that I can store the filepaths for saving.

To clarify, When opening a file in a new tab, I need to be able to store the string with the tab. In Java, I would use a

HashMap<Tab, String>
to solve this problem.

Is there a way to solve this problem?

Thank you in advance

lll lll

You can use Dictionary<Tab, String>. More information can be found here