All These Things That I've Done

Apply the programming model to everyday programming problems...
posts - 80, comments - 76, trackbacks - 34

Region in C++/CLI

Tutti ormai sanno che la direttiva #region di C# aiuta ad aumentare la leggibilità del codice e che la direttiva stessa non esiste direttamente in c++. Quello che forse non si sa è che le region sono utilizzabili con il C++ dal VS2005, attraverso la direttiva pragma. Ecco un piccolo snippet:

#pragma region Main

int main(array ^args)

{

Console::WriteLine(L"Hello World");

return 0;

}

#pragma endregion

Adesso non si hanno più scuse per non usare il c++/cli :)

Print | posted on domenica 29 gennaio 2006 9.52 | Filed Under [ C++ ]

Feedback

Gravatar

# re: Region in C++/CLI

Ottimo post :)
06/12/2006 1.38 | ercand
Gravatar

# re: Region in C++/CLI

questa e' una notizia favolosa!!!!!!!!!!!!!!!!!!

infinite righe di codice ora ordinate in comode parentesine... che bello l'ordine!!!

non so come ringraziarti ^^

ps: ci sara' il modo di renderle trasparenti anche a gcc??

17/04/2007 19.11 | arwen_h

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 1 and 7 and type the answer here:

Powered by: