R
raylopez99
Yeah, you seem to always have that problem. Noted.
Thank you! I ran this and it works, and I learned something. Isn't
that what Usenet is for? Or is it only for flaming?
Let me ask you then: I'm going through your book and your writings
(finished Extension methods in the cheat sheet this afternoon; good
job). It is a good book and I understand it. Now, if somebody
finishes and understands "C# in Depth" by Jon Skeet--how far along
from 0% (no clue about C#) to 100% (guru) will they be? Riddle me
this please? I will trap you in your own words. If you say "20%" and
essentially adopt Goran's position that to get to 80% you need at
least two years experience in C#, then you implicitly agree your book
is not "in depth". On the other hand, if you agree, then perhaps C#
does not have as much 'depth' as other languages. I will eagerly
await your reply Jon.
NO! Don't rehash this stuff Jon. It shows you are so juvenile. No
wonder you can't hold a steady job. What the debate was--and I recall
it clearly--was semantics. I even have your most pithy reply in my
notes (unlike you, I take notes):
QUOTE
class *object* isn't being declared - a *variable* is being declared.
Just because there's a variable doesn't mean any object is necessarily
being created. The variable may have a null value, or refer to an
object which was created elsewhere. For instance:
StringBuilder sb1 = new StringBuilder();
StringBuilder sb2 = sb1;
That has declared two variables, but only one object has been created.
(instantiated object sb1 is one variable, and sb2 is another variable)
UNQUOTE
No, you're the one that doesn't know what a forward declaration is
(used in C++) or what a copy constructor is (id), but let's not rehash
this old stuff, please.
Actually, they do! Try easily passing parameters (variable 1, 2, etc)
in-between Main() and other translation units, and you'll be hard
pressed unless you use using classes. Not true with Windows apps:
you simply use a parametricized constructor along the lines of Form2
myform2 = new Form2(variable1,varia2, etc);
I don't have any problem either. Your problem is that you like to
talk down to people just because they don't have your narrow
expertise. You're not an expert in my field either.
Who cares about 'threadsafe'? Parallel programming is so stupid. In
the year 2012+ the compiler will break up your program into non-
overlapping parallel threads; no need to bother yourself with that
now. let the compiler handle it.
RL
Here is a short but complete program ordering all the even numbers
first, then all the odd ones (within the range 0-9):
using System;
using System.Linq;
public class Test
{
static void Main()
{
var orderByParity = Enumerable.Range(0, 10)
.OrderBy(r => r%2!=0);
foreach (int x in orderByParity)
{
Console.WriteLine(x);
}
}
}
Note that *ordering* isn't *filtering*. If you want to only show the
odd values, you need to use Where rather than OrderBy.
Thank you! I ran this and it works, and I learned something. Isn't
that what Usenet is for? Or is it only for flaming?
Let me ask you then: I'm going through your book and your writings
(finished Extension methods in the cheat sheet this afternoon; good
job). It is a good book and I understand it. Now, if somebody
finishes and understands "C# in Depth" by Jon Skeet--how far along
from 0% (no clue about C#) to 100% (guru) will they be? Riddle me
this please? I will trap you in your own words. If you say "20%" and
essentially adopt Goran's position that to get to 80% you need at
least two years experience in C#, then you implicitly agree your book
is not "in depth". On the other hand, if you agree, then perhaps C#
does not have as much 'depth' as other languages. I will eagerly
await your reply Jon.
You didn't understand what declaring a variable meant.
NO! Don't rehash this stuff Jon. It shows you are so juvenile. No
wonder you can't hold a steady job. What the debate was--and I recall
it clearly--was semantics. I even have your most pithy reply in my
notes (unlike you, I take notes):
QUOTE
class *object* isn't being declared - a *variable* is being declared.
Just because there's a variable doesn't mean any object is necessarily
being created. The variable may have a null value, or refer to an
object which was created elsewhere. For instance:
StringBuilder sb1 = new StringBuilder();
StringBuilder sb2 = sb1;
That has declared two variables, but only one object has been created.
(instantiated object sb1 is one variable, and sb2 is another variable)
UNQUOTE
You thought it
was a forward declaration of a class. That's pretty fundamental.
No, you're the one that doesn't know what a forward declaration is
(used in C++) or what a copy constructor is (id), but let's not rehash
this old stuff, please.
You
believed that GUI applications were so completely different to console
apps that they would handle parameter passing differently. Those two
are just off the top of my head
Actually, they do! Try easily passing parameters (variable 1, 2, etc)
in-between Main() and other translation units, and you'll be hard
pressed unless you use using classes. Not true with Windows apps:
you simply use a parametricized constructor along the lines of Form2
myform2 = new Form2(variable1,varia2, etc);
I've seen plenty of people understand lambda expressions, order-by
projections etc with no problem. I certainly wouldn't say that all of
them are "gurus".
I don't have any problem either. Your problem is that you like to
talk down to people just because they don't have your narrow
expertise. You're not an expert in my field either.
Assuming you mean StaticRandom, you'll see that it uses the standard
library's random number generator anyway. It just does so in a way
which makes it threadsafe.
Who cares about 'threadsafe'? Parallel programming is so stupid. In
the year 2012+ the compiler will break up your program into non-
overlapping parallel threads; no need to bother yourself with that
now. let the compiler handle it.
RL