コード例 #1
0
        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);
        }
コード例 #2
0
    /// <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);
    }
コード例 #3
0
    private void Start()
    {
        print(m_stringStringDictionary.Count);
        string val;

        m_stringStringDictionary.TryGetValue("first key00", out val);
        print(val);
    }