Learn VB .NET Through Game Programming [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Learn VB .NET Through Game Programming [Electronic resources] - نسخه متنی

Matthew Tagliaferri

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید





Setting Up Methods


The procedures discussed in the previous section, UpdateGuessButtons, are called methods. A method is a procedure or function associated with a class. In the case of the Guess the Die Roll program, the UpdateGuessButtons method is associated with the fGuess class, which is a subclass of the .NET Framework form class.

Methods are often thought of as the “do work” code for a class. Because of this, it’s common that a method name is an action phrase or a verb. Look at all of the method names associated with the final (version 1) fGuess class in the Guess the Die Roll program, and you’ll see a pattern:



RollTheDie



UpdateDiePosition



DrawDie



UpdateGuessButtons



Each of the method names has a verb in it, and thus it’s self-evident what task each method performs.

/ 106