Overloads

TeeGofer general
Locked
Diego
Newbie
Newbie
Posts: 41
Joined: Wed Jun 23, 2004 4:00 am
Location: www.adventurerland.com
Contact:

Overloads

Post by Diego » Thu Jan 06, 2005 6:31 pm

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

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Jan 11, 2005 8:42 am

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.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Locked