Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void
示例#1
0
 /// <summary>
 /// The show.
 /// </summary>
 /// <param name="formName">The form name.</param>
 /// <param name="label">The label.</param>
 /// <param name="name">The name.</param>
 /// <param name="buttonName">The button name.</param>
 /// <returns>The show.</returns>
 /// <remarks></remarks>
 public static string Show(string formName, string label, string name, string buttonName)
 {
     GetNameDialog temp = new GetNameDialog(formName, label, name, buttonName);
     temp.ShowDialog();
     name = temp.textBox1.Text;
     temp.Dispose();
     return name;
 }
示例#2
0
        /// <summary>
        /// The show.
        /// </summary>
        /// <param name="formName">The form name.</param>
        /// <param name="label">The label.</param>
        /// <param name="name">The name.</param>
        /// <param name="buttonName">The button name.</param>
        /// <returns>The show.</returns>
        /// <remarks></remarks>
        public static string Show(string formName, string label, string name, string buttonName)
        {
            GetNameDialog temp = new GetNameDialog(formName, label, name, buttonName);

            temp.ShowDialog();
            name = temp.textBox1.Text;
            temp.Dispose();
            return(name);
        }