Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. Classes in the .NET Framework > Adding Parameters

Adding Parameters

2 The Allocate() method is public and doesn’t return a value, so the defaults for type and modifier are correct. But it does have two parameters: an Int32 called quantity and a Boolean called schedule. Click on the triangle just to the left of the method name in the Class Details pane to open the parameters list for the method, and then add the parameters:

image

On Your Own

image

Before you open the code file for the Component class, what do you think the declaration of a method looks like?



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint