I am trying to set the array keys as a strings like in the example below, but inC#.
You can also use a KeyedCollection http://msdn.microsoft.com/en-us/library/ms132438%28v=vs.110%29.aspx where your value is a complex type and has a unique property.
You have your collection inherit from KeyedCollection, example ...
public class BlendStates : KeyedCollection
{
...
This requires you to override the GetKeyForItem method.
protected override string GetKeyForItem(BlendState item)
{
return item.DebugName;
}
Then, in this example, the collection is indexed by string (the debug name of the BlendState):
OutputMerger.BlendState = BlendStates["Transparent"];