This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy



Download 21,46 Mb.
Pdf ko'rish
bet159/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   155   156   157   158   159   160   161   162   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

Figure 2-22.

Activating a code refactoring

C H A P T E R   2  



B U I L D I N G   C #  A P P L I C AT I O N S



57

8849CH02.qxd  9/24/07  10:50 AM  Page 57




Name your new method ConfigureCUI using the resulting dialog box. When you have finished,

you will find that your Main() method calls the newly generated ConfigureCUI() method, which

now contains the previously selected code:

class Program

{

static void Main(string[] args)



{

ConfigureCUI();

// Wait for key press to close.

Console.ReadLine();

}

private static void ConfigureCUI()



{

// Set up Console UI (CUI)

Console.Title = "My Rocking App";

Console.ForegroundColor = ConsoleColor.Yellow;

Console.BackgroundColor = ConsoleColor.Blue;

Console.WriteLine("*************************************");

Console.WriteLine("***** Welcome to My Rocking App *****");

Console.WriteLine("*************************************");

Console.BackgroundColor = ConsoleColor.Black;

}

}

This is a simple example of using the built-in refactorings of Visual Studio 2008, and you’ll see



additional examples here and there over the course of this text. However, if you are interested in

more information on the refactoring process and a detailed walk-through of each refactoring sup-

ported by Visual Studio 2008, look up my article “Refactoring C# Code Using Visual Studio 2005”

online at http://msdn.microsoft.com (again, while this article was written for Visual Studio 2005,

Visual Studio 2008 has the same refactoring support).


Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   155   156   157   158   159   160   161   162   ...   1830




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish