Page 1 of 1

Overloads

Posted: Thu Jan 06, 2005 6:31 pm
by 8727948
When a method has overloads, the Members Table shows the description of the first method. Is it possible to specify a description common to all overloads???

Regards

Posted: Tue Jan 11, 2005 8:42 am
by Chris
Hi Diego,
When a method has overloads, the Members Table shows the description of the first method. Is it possible to specify a description common to all overloads???
Sure .. please let me walk you though an example: imagine we have a simple dll similar to this one:

Code: Select all

using System;
using System.Drawing.Design;

namespace ClassLibrary1 {
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	public class Class1 : UITypeEditor, AsInterface {
		/// <summary>
		/// Class1 Constructor.
		/// </summary>
		public Class1() {}
		/// <summary>
		/// Overridden EditValue method.
		/// </summary>
		public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value) {
			return base.EditValue (context, provider, value);
		}
		/// <summary>
		/// Overloaded DoLittle method One.
		/// </summary>
		public void DoLittle() {
			
		}
		/// <summary>
		/// Overloaded DoLittle method Two.
		/// </summary>
		public void DoLittle(int i) {
			
		}
		/// <summary>
		/// Overloaded DoLittle method Three.
		/// </summary>
		public void DoLittle(int i, object o) {
			
		}
	}
	/// <summary>
	/// AsInterface interface.
	/// </summary>
	public interface AsInterface {
		/// <summary>
		/// DoLittle abstract method.
		/// </summary>
		void DoLittle();
	}
}
Now build this code and create a new TeeGofer project around it and nagivate to the 'Class1 Methods' node (the Class1 methods member page) and you will see 'Overloaded DoLittle method One.' as the description of the DoLittle method; to modify this method, click on the 'Tables' tab next to the 'Preview' tab and you will be able to change the description given to this method in the various members tables.