|
We'll have to wait and see - I've been wrong before.
2012, I think it was...
(Around 10 past 8, anyway)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
10.37 on 17th April 2015 as well.
Only kidding - we have a winner.
Yeah, I reread the clue and noticed that future was missing. Not sure how I missed it in the first place.
|
|
|
|
|
Movie Quote Of The Day
You get the dwarf. I'll get the girl.
Which movie?
|
|
|
|
|
One Night in Mordor
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Jumanji
You have just been Sharapova'd.
|
|
|
|
|
Jumanji? Really? How could you possibly get that wrong?
|
|
|
|
|
I didn't get it wrong, I was playing by the rules[^].
You have just been Sharapova'd.
|
|
|
|
|
Oh, didn't know that.
|
|
|
|
|
Freaks Uncensored[^]???
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
|
The Cannonball Run [think Sammy Davis jr]
-or-
The Princess Bride
veni bibi saltavi
|
|
|
|
|
The hobo : an unexperienced journey
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
}
|
|
|
|
|
Removed the answer.
modified 17-Apr-15 4:37am.
|
|
|
|
|
yes it is, but I'm pretty sure you looked it up since yesterday you guessed it too.
Secondly, you dó know the actual game is not to guess the title, right?
|
|
|
|
|
The Book Club?
veni bibi saltavi
|
|
|
|
|
Sorry, didn't know the rules. I have removed the answer. But I didn't look up this one either.
|
|
|
|
|
psst. the game is to try and get wrong, but in the right area, answers. Or make a Paris Hilton / Money Pit / Rambo / Pron reference.
veni bibi saltavi
|
|
|
|
|
The Scientologist
Some men are born mediocre, some men achieve mediocrity, and some men have mediocrity thrust upon them.
|
|
|
|
|
Lust in the Dust
Mongo: Mongo only pawn... in game of life.
|
|
|
|
|
snowwhite and the seven dwarf(s)
Life's like a nose, you've got to get out of it whats in it!
|
|
|
|
|
It's QA![^]
Now it all makes sense!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
The last one is my coding style.
veni bibi saltavi
|
|
|
|
|
Guess the output:
namespace Quiz
{
public class Base
{
public static string Name { get ; protected set ; }
static Base() { Name = "I am Base" ; }
}
public class Derived : Base
{
static Derived() { Name = "I am Derived" ; }
}
public static class Quiz
{
public static void Main()
{
System.Console.WriteLine ( Base.Name ) ;
System.Console.WriteLine ( Derived.Name ) ;
Base b = new Derived() ;
System.Console.WriteLine ( Derived.Name ) ;
}
}
}
This issue bit me this week when I refactored some code.
Originally I had a base class (with some static members) and some derived classes that set the static values as needed. (This has worked just fine for more than a year.)
This week, while refactoring, I decided that the static and instance parts should be separated (they really should), so I split them. A few days later I realized that the static parts weren't behaving as expected.
The problem was that after splitting the instance parts away, I no longer instantiate the class that contains the static parts and the static constructors in the derived classes never get called!
My solution was to eliminate the use of static and to have a normal class that I instantiate with the appropriate values. This is a much better technique for other reasons as well.
The following two pages were no help:
https://msdn.microsoft.com/en-us/library/k9x6w0hc(v=vs.120).aspx[^]
http://csharpindepth.com/Articles/General/BeforeFieldInit.aspx[^]
|
|
|
|
|
Interesting and I am glad I guessed it correctly.
As I know them, static members are associated with the type and not the instance. So, although the Derived class has the static property, it's still associated with the Base class. And hence the static ctor of the Derived class doesn't get called until you instantiate it. So, unless you explicitly have that property in the Derived class (since it can't be overridden), the output would be:
I am Base
I am Base
I am Derived
Here's an SO question[^] the accepted answer of which you might find interesting (of course, I am sure you already know this ).
Or it's due to "Calling static methods of a type does not force the system to initialize the type."
-- EDIT
Correct me if I am wrong.
You have just been Sharapova'd.
modified 17-Apr-15 3:02am.
|
|
|
|
|
All your base are belong to us.
-Derived
|
|
|
|