GetString() public static method

Provide access to resource string value.
public static GetString ( string name ) : string
name string Received string name.
return string
 /// <summary>
 /// Explicitly defined default constructor.
 /// </summary>
 public XSharpGeneralPropertyPage()
 {
     this.Name = Resources.GetString(Resources.GeneralCaption);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Refreshes the data in the property browser
        /// </summary>
        internal static void RefreshPropertyBrowser()
        {
            IVsUIShell vsuiShell = XSharpProjectPackage.GetGlobalService(typeof(SVsUIShell)) as IVsUIShell;

            if (vsuiShell == null)
            {
                string message = XHelperMethods.SafeStringFormat(CultureInfo.CurrentUICulture, Resources.GetString(Resources.CannotGetService), typeof(IVsUIShell).Name);
                throw new InvalidOperationException(message);
            }
            else
            {
                int hr = vsuiShell.RefreshPropertyBrowser(0);
                if (hr != 0)
                {
                    Marshal.ThrowExceptionForHR(hr);
                }
            }
        }