One-garian Notation
-
Ugyes vagy! [probably missed some accents but nem eldekel] The best 'Hungarian Notation' is 'Az Anyad' a greating bound to win friends and influence people.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
I suspect that this will not win friends, but will influence people... :laugh: So in Gealic: Pogue mahone!
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
-
I suspect that this will not win friends, but will influence people... :laugh: So in Gealic: Pogue mahone!
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
OriginalGriff wrote:
So in Gealic: Pogue mahone!
Not even close. It's an inoquous phrase - literaly 'your mother' - but causes DEFCON2 offence. A bit like saying to a Cpian that they sound like CSS.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
-
aspdotnetdev wrote:
why not "btn"?
OriginalGriff wrote:
I never said I was consistent!
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
OriginalGriff wrote:
I never said I was consistent!
But you always say that!
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
-
Wow, lots of comments! :) But I'd like to ask if anyone has any opinion regarding my suggesions, which I'm actually quite serious about, despite the humorous tone of my posting? - The names of constants must start with the letter C. - The names of delegates must start with the letter D. - The names of enumerators must start with the letter E. Justifications: - Previous standard for constants was THE_UPPERCASE_SCREAMING style, because constants are different. So I want to still emphasise that constants are different, and adding the C does that. - I often have a delegate declaration that is for a specific method, so it makes sense to use the name of the method with the D added to the front. - The use of enumerators often involves declaring a usage of the enumerator that naturally would have the same name as the enumerator itself, which isn't allowed. So by saying the enumerator name starts with E then the usage can have the same name without the E. Just like with INames for interfaces and TNames for types, these three things are sufficiently different from run-of-the-mill items that I like the idea of giving them special names.
RenniePet wrote:
Previous standard for constants was THE_UPPERCASE_SCREAMING style, because constants are different
Why? How is a constant different from a property with no setter? From an enum value? (And yes I do know a property could do other things...)
RenniePet wrote:
it makes sense to use the name of the method with the D added to the front.
Again, why? If you have a delegate with only one method, why are you using a delegate? If you can have lots of methods assigned to a delegate, which one would you pick to use for the delegate name?
RenniePet wrote:
The use of enumerators often involves declaring a usage of the enumerator that naturally would have the same name as the enumerator itself, which isn't allowed.
It is in C#!
DownloaderReporting DownloaderReporting = 0; DownloaderReporting = DownloaderReporting.Normal;
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
-
OriginalGriff wrote:
So in Gealic: Pogue mahone!
Not even close. It's an inoquous phrase - literaly 'your mother' - but causes DEFCON2 offence. A bit like saying to a Cpian that they sound like CSS.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
When I saw the Google translation to "The Mother" I guessed it might just be a smidgen offensive... :laugh:
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
-
RenniePet wrote:
Previous standard for constants was THE_UPPERCASE_SCREAMING style, because constants are different
Why? How is a constant different from a property with no setter? From an enum value? (And yes I do know a property could do other things...)
RenniePet wrote:
it makes sense to use the name of the method with the D added to the front.
Again, why? If you have a delegate with only one method, why are you using a delegate? If you can have lots of methods assigned to a delegate, which one would you pick to use for the delegate name?
RenniePet wrote:
The use of enumerators often involves declaring a usage of the enumerator that naturally would have the same name as the enumerator itself, which isn't allowed.
It is in C#!
DownloaderReporting DownloaderReporting = 0; DownloaderReporting = DownloaderReporting.Normal;
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
-
OriginalGriff wrote:
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in.
Does that work?
Join the cool kids - Come fold with us[^]
It depends on how broadly written the court order is... :((
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
-
RenniePet wrote:
Previous standard for constants was THE_UPPERCASE_SCREAMING style, because constants are different
Why? How is a constant different from a property with no setter? From an enum value? (And yes I do know a property could do other things...)
RenniePet wrote:
it makes sense to use the name of the method with the D added to the front.
Again, why? If you have a delegate with only one method, why are you using a delegate? If you can have lots of methods assigned to a delegate, which one would you pick to use for the delegate name?
RenniePet wrote:
The use of enumerators often involves declaring a usage of the enumerator that naturally would have the same name as the enumerator itself, which isn't allowed.
It is in C#!
DownloaderReporting DownloaderReporting = 0; DownloaderReporting = DownloaderReporting.Normal;
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
That's just asking for a wet-kipper slap! :) I was going to suggest that itwould be better to camel the variable so:
DownloaderReporting downloaderReporting = 0;
downloaderReporting = DownloaderReporting.Normal;But then the property's still going to be:
DownloaderReporting DownloaderReporting { get { return this.downloaderReporting; } }
Either way, things'll go kaka quicker then you can even punch an MS employee's face.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
-
RenniePet wrote:
Previous standard for constants was THE_UPPERCASE_SCREAMING style, because constants are different
Why? How is a constant different from a property with no setter? From an enum value? (And yes I do know a property could do other things...)
RenniePet wrote:
it makes sense to use the name of the method with the D added to the front.
Again, why? If you have a delegate with only one method, why are you using a delegate? If you can have lots of methods assigned to a delegate, which one would you pick to use for the delegate name?
RenniePet wrote:
The use of enumerators often involves declaring a usage of the enumerator that naturally would have the same name as the enumerator itself, which isn't allowed.
It is in C#!
DownloaderReporting DownloaderReporting = 0; DownloaderReporting = DownloaderReporting.Normal;
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
Maybe I'm not explaining myself very well ... Here are some examples:
const string CServiceName = "Merlinia Process Manager"; private delegate void DProcessProcessHasStopped(IntPtr processHandle); private DProcessProcessHasStopped \_processProcessHasStopped; private void InitializeCrossThreadInvocation() { \_processProcessHasStopped = ProcessProcessHasStopped; } private void CT\_ProcessProcessHasStopped(IntPtr processHandle) { base.InvokeDelegate(\_processProcessHasStopped, processHandle); }
This is part of a pattern in a class that supports cross-thread invocation of methods.
public enum EProcessStatus
{
ProcStopped,
ProcStarting, // Has been started, but has not reported "up and running"
ProcRunning,
ProcStopping // Has been signaled to stop, but not stopped yet
}public EProcessStatus ProcessStatus;
-
It depends on how broadly written the court order is... :((
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
Find a target who travels. The joy of legal juristiction means that somewhere wont enforce the restraining order.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
-
Find a target who travels. The joy of legal juristiction means that somewhere wont enforce the restraining order.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
I bow to the expert in the field! Respect!
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
-
That's just asking for a wet-kipper slap! :) I was going to suggest that itwould be better to camel the variable so:
DownloaderReporting downloaderReporting = 0;
downloaderReporting = DownloaderReporting.Normal;But then the property's still going to be:
DownloaderReporting DownloaderReporting { get { return this.downloaderReporting; } }
Either way, things'll go kaka quicker then you can even punch an MS employee's face.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
Yes, normally I would camelCase it, but it was just an example to show it can be done in C#. Normally I would call it reportingReason or similar as I would consider it too confusing to use the enum name as the name for an instance of that enum - it would be like saying
string string = "string";
and expecting no-one to laugh at you...
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
-
OriginalGriff wrote:
I never said I was consistent!
But you always say that!
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
Question: what do you call a char *? char * pntrCharArray = "Char Pointer"; CString cstrString;
-
Yes, normally I would camelCase it, but it was just an example to show it can be done in C#. Normally I would call it reportingReason or similar as I would consider it too confusing to use the enum name as the name for an instance of that enum - it would be like saying
string string = "string";
and expecting no-one to laugh at you...
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
Ha ha!
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Question: what do you call a char *? char * pntrCharArray = "Char Pointer"; CString cstrString;
TopCoder23 wrote:
what do you call a char *?
Earl Grey.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
-
I bow to the expert in the field! Respect!
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
Is it too late to add "... or so I have heard."?
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
-
Yes, normally I would camelCase it, but it was just an example to show it can be done in C#. Normally I would call it reportingReason or similar as I would consider it too confusing to use the enum name as the name for an instance of that enum - it would be like saying
string string = "string";
and expecting no-one to laugh at you...
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
Spam spam = Spam.WonderfulSpam;
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
-
Is it too late to add "... or so I have heard."?
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
Oh yes! :laugh:
I have learnt that you can not make someone love you, all you can do is stalk them and hope they panic and give in. Apathy Error: Don't bother striking any key.
-
Maybe I'm not explaining myself very well ... Here are some examples:
const string CServiceName = "Merlinia Process Manager"; private delegate void DProcessProcessHasStopped(IntPtr processHandle); private DProcessProcessHasStopped \_processProcessHasStopped; private void InitializeCrossThreadInvocation() { \_processProcessHasStopped = ProcessProcessHasStopped; } private void CT\_ProcessProcessHasStopped(IntPtr processHandle) { base.InvokeDelegate(\_processProcessHasStopped, processHandle); }
This is part of a pattern in a class that supports cross-thread invocation of methods.
public enum EProcessStatus
{
ProcStopped,
ProcStarting, // Has been started, but has not reported "up and running"
ProcRunning,
ProcStopping // Has been signaled to stop, but not stopped yet
}public EProcessStatus ProcessStatus;
But, but, but .........
public enum EProcessStatus
{
ProcStopped,
ProcStarting, // Has been started, but has not reported "up and running"
ProcRunning,
ProcStopping // Has been signaled to stop, but not stopped yet
}public EProcessStatus ProcessStatus { get; set; }
surely?
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
TopCoder23 wrote:
what do you call a char *?
Earl Grey.
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
har har !!!! I like it ...