Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP's With...EndWith equivalent in C# ?
Message
 
À
16/04/2007 15:46:23
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01216132
Message ID:
01216470
Vues:
23
>I remember reading an interview with one of the guys from the C# team a few years ago. When asked whether they'd add "with" to C#, he's reply was "over my dead body". :)
>
>Like others have said here, with intellisense in VS 2005, the "with" block makes less sense. Also, "with" makes the code harder to read (I like it better to just create a variable that stores a reference to whatever I'd have on the "with" block).

I wonder why the same perception is not applied to the Using directive, ie, why using this code
using System;

Console.WriteLine();
when if following the same logic used for dismissing the with clause
System.Console.WriteLine();
Is more readable. The funny thing is that I found the latter more readable than using "Using" but I found "with..endwith" more readable than a verbose set of commands, I guess I should stay away from C# <g>
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform