DMabulage
New member
- Joined
- Nov 21, 2024
- Messages
- 1
- Programming Experience
- Beginner
I have a class with a static dictionary; when I try to access the values of that dictate, it throws an error.
I'm using this in a playwright project.
C#:
public class ShortCodes
{
public static readonly Dictionary<string, string> PersonNameTypeCode = new Dictionary<string, string>
{
{ "Legal", "LGL" },
{ "Maiden Name", "MDN" },
{ "Birth Name", "BTH" },
{ "Tribal Name", "TRB" },
{ "Preferred Name", "PRF" },
{ "Also Known As", "AKA" },
{ "Stage Name", "STG" },
{ "XFR", "XFR" }
};
}
C#:
var e = ShortCodes.PersonNameTypeCode["Legal"];
I'm using this in a playwright project.