Intellisense Strikes Again
-
I ended up doing this to myself a few weeks ago.
public class MyObject
{
private int _number;public MyObject(int number)
{
_number = number;
}public int Number
{
get { return Number; }
}
}If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.
if (Object.DividedByZero == true) { Universe.Implode(); }
-
I ended up doing this to myself a few weeks ago.
public class MyObject
{
private int _number;public MyObject(int number)
{
_number = number;
}public int Number
{
get { return Number; }
}
}If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.
if (Object.DividedByZero == true) { Universe.Implode(); }
Foothill wrote:
since VS steps over them by default.
And then trying to remember where the setting is takes an additional twenty minutes.
-
I ended up doing this to myself a few weeks ago.
public class MyObject
{
private int _number;public MyObject(int number)
{
_number = number;
}public int Number
{
get { return Number; }
}
}If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.
if (Object.DividedByZero == true) { Universe.Implode(); }
Intellisense is not all that intelligent. What I would like is having Intellisense NOT select the property/method/etc you are currently typing in as the default item! How hard could it be to do that?
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
-
I ended up doing this to myself a few weeks ago.
public class MyObject
{
private int _number;public MyObject(int number)
{
_number = number;
}public int Number
{
get { return Number; }
}
}If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.
if (Object.DividedByZero == true) { Universe.Implode(); }
Ouch, 20 mins? Never looked at the stack trace when you got the exception?
Wout
-
Ouch, 20 mins? Never looked at the stack trace when you got the exception?
Wout
You don't get a stack trace with a StackOverflowException. The application just quits.
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
-
You don't get a stack trace with a StackOverflowException. The application just quits.
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
In VS you do.
Wout
-
In VS you do.
Wout
Nope, I had a similar issue a while ago. The VS debugger just gives up with a StackOverflow error which is terrible. 20mins is admirable, I spent half a day learning from this experience. :rolleyes:
-
Nope, I had a similar issue a while ago. The VS debugger just gives up with a StackOverflow error which is terrible. 20mins is admirable, I spent half a day learning from this experience. :rolleyes:
Maybe I'm a super ninja, but I only takes me a few minutes finding them. Turn on break on exceptions, and if that's too late you can usually pause the program after the cpu goes to 100% for a few secs, and voila you got your stack trace. Has worked for years for me.
Wout
-
Intellisense is not all that intelligent. What I would like is having Intellisense NOT select the property/method/etc you are currently typing in as the default item! How hard could it be to do that?
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
Brisingr Aerowing wrote:
Intellisense is not all that intelligent
Still, it's come a long way since VS 6.0 when you had to type (or paste) all your variable names. I've been there recently and kept scrolling the mouse wheel, waiting for something to happen! :omg:
"Go forth into the source" - Neal Morse
-
Brisingr Aerowing wrote:
Intellisense is not all that intelligent
Still, it's come a long way since VS 6.0 when you had to type (or paste) all your variable names. I've been there recently and kept scrolling the mouse wheel, waiting for something to happen! :omg:
"Go forth into the source" - Neal Morse
Oldest VS version I've used is 2008.
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
-
Maybe I'm a super ninja, but I only takes me a few minutes finding them. Turn on break on exceptions, and if that's too late you can usually pause the program after the cpu goes to 100% for a few secs, and voila you got your stack trace. Has worked for years for me.
Wout
On my machine it happens in less than a second. So no time to break the debugger.
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
-
On my machine it happens in less than a second. So no time to break the debugger.
What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???
I'm having both ninja skills and a magic core i7 then, sweet.
Wout
-
I ended up doing this to myself a few weeks ago.
public class MyObject
{
private int _number;public MyObject(int number)
{
_number = number;
}public int Number
{
get { return Number; }
}
}If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.
if (Object.DividedByZero == true) { Universe.Implode(); }
-
I ended up doing this to myself a few weeks ago.
public class MyObject
{
private int _number;public MyObject(int number)
{
_number = number;
}public int Number
{
get { return Number; }
}
}If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.
if (Object.DividedByZero == true) { Universe.Implode(); }
Foothill wrote:
class MyObject
Calling a class
MyObject
is a bit weird. You could call itMyClass
or perhaps something more meaningful likeNumberImpl
or something?Mobile Apps - Sound Meter | Color Analyzer | SMBC | Football Doodles
-
I ended up doing this to myself a few weeks ago.
public class MyObject
{
private int _number;public MyObject(int number)
{
_number = number;
}public int Number
{
get { return Number; }
}
}If took me 20 minutes to figure out why I kept getting a stackoverflow execption. :doh: I need to pay more attention to what intellisense is suggesting I type. This goes double for properties since VS steps over them by default.
if (Object.DividedByZero == true) { Universe.Implode(); }
Change your language to VB.NET. Has same capabilities as C#, better debugger, better intellisense and is NOT case sensitive :) You can write the property without having the variable spelled out. And without getter or setter.
Public ReadOnly Property Number as Integer
is all you need.
-
Change your language to VB.NET. Has same capabilities as C#, better debugger, better intellisense and is NOT case sensitive :) You can write the property without having the variable spelled out. And without getter or setter.
Public ReadOnly Property Number as Integer
is all you need.
Sinisa Hajnal wrote:
better debugger, better intellisense
How is it better?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
-
Change your language to VB.NET. Has same capabilities as C#, better debugger, better intellisense and is NOT case sensitive :) You can write the property without having the variable spelled out. And without getter or setter.
Public ReadOnly Property Number as Integer
is all you need.
You probably lost the 'joke' icon... I would like to know in what way the debugger and the intellisense is better? And VB is NOT case-insensitive - the IDE only fixes your cases after you wrote the name down the first time (and this happens also in C# now)... As for the properties...
public int Number { get; private set; }
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
-
Sinisa Hajnal wrote:
better debugger, better intellisense
How is it better?
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
My last use of C# was about a year ago so if something changed I apologize for the comment. :) I didn't lost the joke icon. I use both languages and prefer VB.NET because of those three reasons (case insensitive, intellisense, debugger) Yes, VB.NET is case INsensitive. If I try to declare variable v and variable V in the same scope it will say it is already defined. In C# this is legal as these are two different variable names. Intellisense is better because it fills end of block automatically and it shows only items from your context not all loaded options. And fill most of the property and other stuff (true, partly because VB needs more text to code).
-
You probably lost the 'joke' icon... I would like to know in what way the debugger and the intellisense is better? And VB is NOT case-insensitive - the IDE only fixes your cases after you wrote the name down the first time (and this happens also in C# now)... As for the properties...
public int Number { get; private set; }
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
See my comment above.
-
You probably lost the 'joke' icon... I would like to know in what way the debugger and the intellisense is better? And VB is NOT case-insensitive - the IDE only fixes your cases after you wrote the name down the first time (and this happens also in C# now)... As for the properties...
public int Number { get; private set; }
Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.
Or, with C# 6:
public int Number { get; } = 42;
// Or:
public int Number { get; }
public YourClass()
{
Number = 42;
}:)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer