public void TryGetValue() { CloneableType value; Assert.IsTrue(_dictionary.TryGetValue("one", out value)); Assert.AreEqual(new CloneableType("first value"), value); Assert.IsFalse(_dictionary.TryGetValue("four", out value)); Assert.AreEqual(null, value); }
/// <summary> /// Get the path to a resource used in a DatablockRef field /// </summary> /// <param name="fieldName">Name of the DatablockRef field</param> /// <returns>Resource path</returns> public string GetResourcePath(string fieldName) { string assetPath = ""; assetPaths.TryGetValue(fieldName, out assetPath); return(assetPath); }
private void Start() { print(m_stringStringDictionary.Count); string val; m_stringStringDictionary.TryGetValue("first key00", out val); print(val); }