Click here to Skip to main content
16,016,744 members

Survey Results

Should C# get the VB-style "with" keyword?   [Edit]

Survey period: 6 Oct 2008 to 13 Oct 2008

If not then maybe we could look into the "Ain't" keyword...

OptionVotes% 
Yes27937.20
No47162.80



 
GeneralSurely Pin
codemunkeh12-Oct-08 6:23
codemunkeh12-Oct-08 6:23 
GeneralPerformance Issues Pin
JMBeyer10-Oct-08 9:18
JMBeyer10-Oct-08 9:18 
GeneralRe: Performance Issues Pin
Mladen Janković11-Oct-08 1:44
Mladen Janković11-Oct-08 1:44 
GeneralRe: Performance Issues Pin
JMBeyer13-Oct-08 3:14
JMBeyer13-Oct-08 3:14 
GeneralRe: Performance Issues Pin
WillemM11-Oct-08 23:41
WillemM11-Oct-08 23:41 
Generalhow about throws? Pin
Don Kackman8-Oct-08 18:33
Don Kackman8-Oct-08 18:33 
GeneralRe: how about throws? Pin
Simon P Stevens8-Oct-08 21:37
Simon P Stevens8-Oct-08 21:37 
GeneralRe: how about throws? Pin
Don Kackman9-Oct-08 6:09
Don Kackman9-Oct-08 6:09 
GeneralRe: how about throws? Pin
edwin_vermeer10-Oct-08 1:02
edwin_vermeer10-Oct-08 1:02 
Generalyes Pin
kubal50038-Oct-08 15:14
kubal50038-Oct-08 15:14 
GeneralUsing a Clone Method? Pin
LongPlay8-Oct-08 2:53
LongPlay8-Oct-08 2:53 
GeneralNo! All my with vars Pin
Paul Watson8-Oct-08 1:55
sitebuilderPaul Watson8-Oct-08 1:55 
JokeRe: No! All my with vars Pin
PIEBALDconsult10-Oct-08 8:51
mvePIEBALDconsult10-Oct-08 8:51 
GeneralC# should be C#! Pin
Aamer Alduais7-Oct-08 21:59
Aamer Alduais7-Oct-08 21:59 
First of all I think that C# should be itself!
I mean that adding such a keyword will make C# more like VB -which I really don't like!-
Thats not the only reason because C# has lots of keywords, and I think adding a new keyword will make C# a language with a lot of keywords which will be a little confusing for some newbies.

In the other hand there is no need for this keyword, well consider this example:
class A
{
     public void Foo();
     public void anotherFoo();
}
class B
{
     public void Woo
     {
          A a = new A();
          with(a)
          {
               .Foo();
               .anotherFoo();
          }
     }
}

Well I can write class B in another way which is better-at least I think so-
class B
{
     public void Woo
     {
          A a = new A();
          a.Foo();
          a.anotherFoo();
     }
}


as for the Ain't keyword, well as I said before about with keyword, however consider the above example:
class c
{
     public A a;
     public B b;
     public bool isA(object obj)
     {
          return (obj.GetType() == typeof(A))? true: false;
          //OR
          //return (obj is A)? true: false;
     }
}

Thats it.
What do you think guys?

Aamer A. Alduais
final_zero

My Favorite Qoute
"Faliure is the beginning of Success"
Aamer A. Alduais (^_^Me^_^)

GeneralRe: C# should be C#! Pin
masfenix9-Oct-08 16:38
masfenix9-Oct-08 16:38 
JokeWhat next? C# flavored On Error Resume Next Pin
Don Kackman7-Oct-08 12:11
Don Kackman7-Oct-08 12:11 
JokeRe: What next? C# flavored On Error Resume Next Pin
Vasudevan Deepak Kumar9-Oct-08 7:59
Vasudevan Deepak Kumar9-Oct-08 7:59 
GeneralRe: What next? C# flavored On Error Resume Next Pin
Don Kackman10-Oct-08 0:44
Don Kackman10-Oct-08 0:44 
JokeRe: What next? C# flavored On Error Resume Next Pin
Lizandro Campbell11-Oct-08 6:09
professionalLizandro Campbell11-Oct-08 6:09 
GeneralRe: What next? C# flavored On Error Resume Next Pin
Russell Morris9-Oct-08 11:18
Russell Morris9-Oct-08 11:18 
GeneralRe: What next? C# flavored On Error Resume Next Pin
Chris Richner9-Oct-08 22:55
Chris Richner9-Oct-08 22:55 
GeneralSuggestion Pin
User of Users Group7-Oct-08 11:36
User of Users Group7-Oct-08 11:36 
GeneralRe: Suggestion PinPopular
Chris Maunder7-Oct-08 11:37
cofounderChris Maunder7-Oct-08 11:37 
GeneralRe: Suggestion Pin
User of Users Group8-Oct-08 12:39
User of Users Group8-Oct-08 12:39 
GeneralRe: Suggestion Pin
Jeremy Falcon10-Oct-08 12:11
professionalJeremy Falcon10-Oct-08 12:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.