Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 30th, 2009, 07:44 AM
Registered User
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default c# Forward declarations

I found (page 1262) 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.....

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forward declarations in c# xyoavx PHP How-To 0 May 30th, 2009 07:01 AM
When to use NEW in declarations LarryMoore BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 8 September 24th, 2008 04:02 PM
Where are my control declarations? Ron Howerton ASP.NET 2.0 Basics 13 December 6th, 2007 03:11 PM
Variable Declarations New2ASPnet General .NET 1 July 30th, 2004 09:49 AM
retaining ENTITY declarations arvin XSLT 3 July 23rd, 2003 01:51 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.