|
RyanDev wrote: The truth of the matter is that many of C#’s syntactic constructs are modeled after various aspects of Visual Basic (VB) and C++.
That's a good thing. It helps a developer make the transition between the two paradigms. The fact that C# and VB.Net are so similar in many ways really makes life easier.
If you think hiring a professional is expensive, wait until you hire an amateur! - Red Adair
|
|
|
|
|
Doesn't C#'s foreach come from VB's For Each ? AFAIK C++ doesn't have any equivalent.
|
|
|
|
|
We still miss some loop constructs that are offered by other languages. One that I miss the most is
for ListElementPointer in ListHead:NextField ....
to traverse a singly linked list, linked through NextField. Then I miss the value set:
for CodeValue in 1, 3, 10..20, 32 do ...
(a total of 14 iterations). And then, another favorite:
for ever do ...
In C, I sometimes "simulate" this by #define ever (;;). Finally, I miss the alternative loop exits, where you specify a different loop tail depending on whether the value set was exhausted or the loop was terminated prematurely because some condition was fulfilled:
for ... do
... code ...
while <contidion for="" looping="" further="">
... maybe more code ...
exitwhile
...code handling premature loop termination...
exitfor
...code handling value set exhausted termination...
An important aspect of the exitfor/exitwhile is that the code is inside the scope or the for statement, so that e.g. variables decalared within the for is available to the tail processing.
If you want to simulate this by setting some termination flag and then break, and after the loop testing: if TerminationCause=exhaustion do <this> else <that>, then what went on in the loop is essentially lost, so this is certainly not a good replacement (and it takes a lot more typing).
Finally, for all sorts of nested constructs: I strongly favor that a label identifies a block, rather than a point. I want to be able to do an: exit InnerLoop; or: exit OuterLoop; or even: exit MyProcedure; without the need for setting all sorts of flags that must be tested after InnerLoop and after OuterLoop and from there take new exit to an outer level.
You could say that this is little more than syntactic sugar. Sure, but syntactic sugar makes programming sweet.
|
|
|
|
|
Your experience here on CodeProject with QA Forums may put you on the inside track, Jack (or, Jill) [^].Quote: “Planetary protection is concerned with the avoidance of organic-constituent and biological contamination in human and robotic space exploration.”
Nasa maintains policies for planetary protection, applicable to all space flight missions that may intentionally or unintentionally carry Earth organisms and organic constituents to the planets or other solar system bodies, and any mission employing spacecraft, which are intended to return to Earth and its biosphere with samples from extraterrestrial targets of exploration.”
«Differences between Big-Endians, who broke eggs at the larger end, and Little-Endians gave rise to six rebellions: one Emperor lost his life, another his crown. The Lilliputian religion says an egg should be broken on the convenient end, which is now interpreted by the Lilliputians as the smaller end. Big-Endians gained favor in Blefuscu.» J. Swift, 'Gulliver's Travels,' 1726CE
|
|
|
|
|
We need a more exciting name. How abou BioCop?
|
|
|
|
|
Space Sanitation Engineer
|
|
|
|
|
|
|
... of the Shallow Space Patrol.
|
|
|
|
|
|
Hey! I've worked hard my whole life to earn my title, so don't lower me down to a measly BioCop. You will address me as 2nd Rank Collateral Orbital Princess
|
|
|
|
|
That's ok. At the first moment I was afraid that your name really is Roger Wilco.
I need a perfect, to the point answer as I am not aware of this.
Please don't reply explaining what method overloading is
|
|
|
|
|
"We're the Guardians of the Galaxy!"
Now is it bad enough that you let somebody else kick your butts without you trying to do it to each other? Now if we're all talking about the same man, and I think we are... it appears he's got a rather growing collection of our bikes.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
More pole dancing?
|
|
|
|
|
Depends how much and who's doing it..
Now is it bad enough that you let somebody else kick your butts without you trying to do it to each other? Now if we're all talking about the same man, and I think we are... it appears he's got a rather growing collection of our bikes.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
Groot.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Someone had better tell the Doctor that he isn't welcome.
|
|
|
|
|
PIEBALDconsult wrote: Someone had better tell the Doctor that he isn't welcome. Doctor who?
|
|
|
|
|
|
How to change Thames and skins in c# desktop application :zzz: :zzz: :zzz:
|
|
|
|
|
By rerouting De Nile
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
From the top of the page:
r discussing anything related to a software developer's life. Technical discussions are encouraged, but click here to ask your programming questions.
Ask the question in the appropriate forum, and, show what you've tried - don't just ask someone to do it for you.
|
|
|
|
|
|
Remove the skins slowly, carefully; make sure to use a finalizer.
Changing the Thames requires you to temporarily reformat your hard-drive, and then, re-channel the waters back upstream into the Churn, the Darent, and the Cray. Xamarin has a library for this.
Do not touch the computer until the waters recede.
«Differences between Big-Endians, who broke eggs at the larger end, and Little-Endians gave rise to six rebellions: one Emperor lost his life, another his crown. The Lilliputian religion says an egg should be broken on the convenient end, which is now interpreted by the Lilliputians as the smaller end. Big-Endians gained favor in Blefuscu.» J. Swift, 'Gulliver's Travels,' 1726CE
|
|
|
|
|
When you repost your question in the correct forum, please make sure you provide more details. For instance, is this a WinForms application? Is it WPF? Are you using any themeable third party libraries, etc? By providing more details in your question, you stand more chance of getting an answer.
|
|
|
|