|
Mr Magoo
I am not a number. I am a ... no, wait!
|
|
|
|
|
|
Only at night time...
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
|
|
|
|
|
Height of living
Find More .Net development tips at : .NET Tips
The only reason people get lost in thought is because it's unfamiliar territory.
|
|
|
|
|
|
Nice one! Thanks.
You always obtain more by being rather polite and armed than polite only.
|
|
|
|
|
Very nice
|
|
|
|
|
You could alias typename!!!
For example, tired of typing <c>System.Guid<c>, and would like a nice lower case alias, like "int"?
how about that instead:
using guid = System.Guid;
guid g = guid.NewGuid();
This pro-tip has been brought to you by Miguel de Icaza in his SkiaSharp implementation!
As seen there[^]!
|
|
|
|
|
Especially good when you have rally long type names and you want to keep line lengths sensible.
Use sparingly though!
cheers
Chris Maunder
|
|
|
|
|
Chris Maunder wrote: Use sparingly though!
ok .. I knew about namespace aliasing, I havnt seen a 'warning' like this .. what gives Mr M ?
|
|
|
|
|
Yes, handy, but not as handy as I'd like.
I found that...
using ListType = System.Collections.Generic.List<int> ;
using MFU = PIEBALD.Types.MasterFileUpdater<ListType,int,ListType,int> ;
... won't compile, but that...
using ListType = System.Collections.Generic.List<int> ;
namespace whatever
{
using MFU = PIEBALD.Types.MasterFileUpdater<ListType,int,ListType,int> ;
}
... will.
|
|
|
|
|
Have you tried prefixing 'ListType' with
global:: in the MFU declaration?
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
|
Wait until you get to my age. I learn something new every day. It's just a shame it's the same thing I learnt yesterday.
|
|
|
|
|
Now if only I could remember what I learned yesterday, I'd be ruler of the Darby & Joan club.
|
|
|
|
|
Thank god for Wikipedia and today's lesson. Never heard of Darby and Joan club. I should add it to my favourites so I can learn it again tomorrow!
|
|
|
|
|
I am in awe of such wisdom!
|
|
|
|
|
I saw this title on Forum msg summary in home page. And I knew, it'd be posted by bloody you. How precise my guesses are becoming.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
modified 26-May-16 4:34am.
|
|
|
|
|
Mmm..... I take it, it is a compliment, ya?!
|
|
|
|
|
Yeah it's kinda cool to talk technical stuff here in Lounge. I'm never against it. I think nobody is.
Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.
|
|
|
|
|
Hi, Super Lloyd,
Yeah, been using this a long while.
The code example by Icaza is kind of "scary," though. Over twenty aliases for System.IntPtr. Clearly, he doesn't like to declare variables the "usual" way; I also find his use of lower-case aliases for Types that would usually have an initial upper-case letter (or use camel-casing) ... strange.
However, looking at that code, it does appear "consistent," and I assume part of his motivation for writing in this format has to with the multi-platform aspect of it.
cheers, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
IntPtr is just a .. void* really.. doesn't tell you much... a bit like those windows HANDLE.
I guess he did that to introduce an helpful illusion of typing!
|
|
|
|
|
So instead of:
using System;
Guid g = Guid.NewGuid();
you use:
using guid = System.Guid;
guid g = guid.NewGuid();
Genius.
|
|
|
|
|
We had no air conditioning as the system actually hadn't been finished at the time the rest of the house was, and we weren't told that (which I believe is a Fort Wayne Construction Code Violation). We just got it fixed, and now there is no power to the outlets in the garage, where our modem is.
I checked each outlet, and found a single outlet next to the Water Heater and Furnace that had power, and jerry rigged a system to power the modem with an extension cord and a power strip. And yes, it works.
We have an electrician coming tomorrow to figure out the power issue, so this is only a temporary measure (it's probably not code compliant, anyways )
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 know there is not a lot going on in the Lounge at the moment but this should really be posted on facebook!
Never underestimate the power of human stupidity
RAH
|
|
|
|