20.3 Fully Qualified Interface MEMBER NAMES

xiaoxiao2021-04-05  299

An Interface Member Is Sometimes Referred to by ITS Fully Qualified Name.

The full Qualified name of an AN

Interface Member Consists of the name of the interface in which the member

Is Declared, Followed by a Dot,

Followed by the name of the mefer. The full qualified name of a member

References the interface in which the

Member is declared. [EXAMPLE: for Example, Given the Declarations

C # language specification

284

Interface icontrol

{

Void paint ();

}

Interface ITextbox: iControl

{

Void setText (String text);

}

The full qualified name of paint is icontrol.paint and the full qualy

Name of setText IS

ITEXTBOX.SETTEXT. IN The Example Above, IT IS Not Possible To Refer to

Paint as itextbox.paint. End

EXAMPLE]

When An Interface Is Part of A Namespace, The Fully Qualified Name of A

Interface Member Includes the

Namespace name. [EXAMPLE: for EXAMPLE

Namespace System

{

Public Interface iCloneable

{

Object clone ();

}

}

Here, The Fully Qualified Name of the Clone Method Is

System.icloneable.clone. End Example]

转载请注明原文地址:https://www.9cbs.com/read-132015.html

New Post(0)