Forward declarations in c#
Hello
I found (page 1262 of the book: Professional c# 3rd edition-by Robinson et al) the following paragraph:
"Forward declarations:
Forward declarations are neither supported nor required in C#, since the order in which items are defined in the source files is immaterial. Itâs perfectly fine for one item to refer to another item that is
only actually defined later in that file or in a different fileâas long as it is defined somewhere. This contrasts with C++, in which symbols and so on can only be referred to in a source file if they have already
been declared in the same file or an included file."
I would like to mention that local variables must be declared before they are used. Therefore the sentence: "Forward declarations are neither supported nor required in C#," is not so correct.....
Thanks in advance
xyoavx
|