StringExtensionsTests ConvertStringToDictionary Method Delta Engine Documentation

Namespace: DeltaEngine.Tests.Extensions
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void ConvertStringToDictionary()
Examples

[Test]
public void ConvertStringToDictionary()
{
    const string ArrayOfStrings = "FirstKey;FirstValue;SecondKey;SecondValue";
    var dictionary = ArrayOfStrings.Convert<Dictionary<string, string>>();
    Assert.IsTrue(dictionary.ContainsKey("FirstKey"));
    Assert.IsTrue(dictionary.ContainsValue("SecondValue"));
}
See Also