When creating a new webpart, or extending an existing webpart, you might want to add properties which can be configured. Using the following code-segment you can do this with the minimal ammount of effort:

// neccessary using:

using System.Web.UI.WebControls.WebParts
using System.ComponentModel

[WebDisplayName("A new property")]
[Category("Custom category")]
public string NewProperty {get;set;}

As you can see, only System-namespaces are needed, not the obsolete Microsoft.SharePoint.WebPartPages (!) These are obsolete since WSS 3.0 / MOSS2007.

Only a few types of properties are supported this way. If you want more control over the generated editor tool part, you have to set WebBrowsable to false and implement a custom EditorPart, by overriding CreateEditorParts.