Esempio n. 1
0
        /// <summary>Returns the string identified by the specified metadata token.</summary>
        /// <returns>A <see cref="T:System.String" /> containing a string value from the metadata string heap.</returns>
        /// <param name="metadataToken">A metadata token that identifies a string in the string heap of the module. </param>
        /// <exception cref="T:System.ArgumentException">
        ///   <paramref name="metadataToken" /> is not a token for a string in the scope of the current module. </exception>
        /// <exception cref="T:System.ArgumentOutOfRangeException">
        ///   <paramref name="metadataToken" /> is not a valid token in the scope of the current module.</exception>
        public string ResolveString(int metadataToken)
        {
            ResolveTokenError error;
            string            text = Module.ResolveStringToken(this._impl, metadataToken, out error);

            if (text == null)
            {
                throw this.resolve_token_exception(metadataToken, error, "string");
            }
            return(text);
        }