Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

C# trouble

Name: Anonymous 2009-12-06 7:50

I dont get it what am i doint wrong?


System.Drawing.Color col;
col = bmp.GetPixel(x, y);
int r = (col.R + col.G + col.B) / 3;
int g = (col.R + col.G + col.B)/ 3;
int b = (col.R + col.G + col.B)/ 3;
col = new System.Drawing.Color.FromArgb(r, g, b);
bmp.SetPixel(x, y, col);


I get

[The nested type `FromArgb' does not exist in the type `System.Drawing.Color'(CS0426)]

Name: Anonymous 2009-12-06 8:11

System.Drawing.Color is a structure, FromArgb is a method. Remove that new keyword.
Learn to read the error message.
And since when was /prog/ supposed to be a place where you can ask questions that can be trivially answered by looking up the documentation (MSDN in this case, but your IDE should have told you this information anyway).

Name: Anonymous 2009-12-06 8:30

Since I come from C
faggot!

Name: Anonymous 2009-12-06 8:36

>>3
Where you come from is irrelevant. /prog/ is not supposed to be a replacement for your documentation.

Name: Anonymous 2009-12-06 8:54

>>3
You should then be doubly ashamed of yourself, C programmers are supposed to be intelligent.

Name: Anonymous 2009-12-06 11:16

you fucking die nigger dipshit!
i come from C and when it doesnt come to languages with lots of verbose like C# and Java (I mean ffs System.Drawing.Color.FromArgb is a tad long for something so simple) I own you all
ALSO, I use C# cause it saves me time for some things

Name: Anonymous 2009-12-06 11:23

>>I mean ffs System.Drawing.Color.FromArgb is a tad long for something so simple
I look at you in bewilderment.  What does it matter how long it is?

Name: Anonymous 2009-12-06 11:26

time spent typing...

Name: Anonymous 2009-12-06 11:26

>>6
Is a three star C programmer

Name: Anonymous 2009-12-06 11:31

>>9
You dont know shit

Name: Anonymous 2009-12-06 11:33

I have to say >>1,3,6,10 is a rather poor and predictable troll.

Name: Anonymous 2009-12-06 11:35

>>6

We are Expert Computer Scientists.  We are not petty programmers of your sort.

We are comfortable in any environment, writing code observant of any paradigm.

You should leave this place.

Name: Anonymous 2009-12-06 11:35

>>11
you are a poorfag

Name: Anonymous 2009-12-06 11:36

>>12
now u make me rage cos i probably know more than what u learned in computer science univ.

Name: Anonymous 2009-12-06 11:40

Next in this thread I expect to see some lunatic raging that it doesn't take that many more lines of code to implement a bucket sort or radix sort than it does a bubble sort, "but it should!"

Name: Anonymous 2009-12-06 11:41

>>12
do you think I should give up on programming Mr Expert? Programming I have been going at for the past say 22 years?
All of this because I didn't realize straight away something in a newfag language that I have very rarely seen before?

Name: Anonymous 2009-12-06 11:44

>>12
Because I will give up if you say computing is not for me, I will give up, after all you are the expert Mr Expert...
Don't mind me I have spent most of my life in computing but yet you are the Expert. If anything I standard coding before you did Mr Expert, but that's ok cause Experts nowadays know it all and they are young and come from universities where they learn about the wonders of Java and Facebook... So as an old assemblyfag I should yield to the younger generation and retreat from anything to do with technology and leave it all to Experts like you?

Name: Anonymous 2009-12-06 11:49

>>17
In a rather amusing note, my college did have one course on Facebook.  Even in I didn't look on it in contempt, I was particularly afraid of it since they botched its entry in the course catalog and it looked like it would deduct credits rather than award it.  I wouldn't blame it if it did.

Name: Anonymous 2009-12-06 11:52

>>12
Expert Computer Scientist

i find your lack of BBcode disturbing

Name: not->>12 2009-12-06 12:04


If anything I standard coding before you did Mr Expert,
standard coding?

and come from universities where they learn about the wonders of Java
Most people here don't like Java or C# that much. A lot can use it, and find it a simple language, with limits, but which is liked by the ENTERPRISE. Javaschools don't teach real computer science. And you don't even need an university to learn computer science, the Internet has more than enough books and papers to teach you much more than you would learn by just going to a real Computer Science course.

and Facebook
What?

So as an old assemblyfag I should yield to the younger generation and retreat from anything to do with technology and leave it all to Experts like you?
A lot of people, including me, learned assembly as one of their first languages, along with C. Of course, solving high-level problems properly is tedious in ASM, and less tedious, but still tedious in C - we all can do it, but it takes a lot more time than doing it in a high level language, so we learned some high level languages for such things.
It seems you mirror this idea too:
>>6
I use C# cause it saves me time for some things

We then read our SICP, and learned of Scheme and Lisp, and have also learned of ML and Haskell, and understand many different programming paradigms, which gives us a very complete view from the most low-level to the most high-level way of doing things.

It's a shame you wasted your life doing things only at the low-level, when truly good high-level languages have always been beside you(Lisp, being some 50 years old now), and you could have learned them a long time ago.

Having trouble with C# is puzzling, as learning the basics of it shouldn't take more than a few days, and the Microsoft's IDE make developing in it an activity which doesn't require too much brain activity.

Name: Anonymous 2009-12-06 12:10

>>20
First I started C# today. Also I like to start doing things straight way not spend ages in meaningless examples in books and whatnots ...
Also, I dont use Microsoft crap. I am actually coding with a normal text editor in Linux like all proper coders.

Name: Anonymous 2009-12-06 12:18

>>21
The free IDE's (Monodevelop/Sharpdevelop comes to mind), aren't that bad for it. I have no idea if vi or Emacs have decent auto-complete and can look up namespaces/classes/methods on the fly. Emacs is godly for writing Lisp, but without using some sort of IDE bridge to look up namespaces/classes/methods, it would be pretty tedious to code in C#/Java in it.

Name: Anonymous 2009-12-06 12:30

stop saging my midlife crisis

Name: Anonymous 2009-12-06 12:45

>>21
for your next language, may i suggest english.

Name: Anonymous 2009-12-06 12:59

>>9
I just realised I forgot my link :(, better late than never
http://c2.com/cgi-bin/wiki?ThreeStarProgrammer

Name: Anonymous 2009-12-06 13:00

>>24
let me guess amerifag?

Name: Anonymous 2009-12-06 13:54

>>26
Would it matter if he was? Americans do not have a monopoly on taking exception to abuses of the English language.

Name: Anonymous 2009-12-06 13:55

SAGE IN ALL FIELDS
PEOPLE ON THIS BOARD ABUSE THEIR SAGE...
ITS SICKENING
YET SOME THREAD WITH "HACK MY ANUS" OR SOMETHING TO THAT EFFECT LIVE ON AND ON

Name: Anonymous 2009-12-06 13:58

>>14,16,17

u mad?

Name: Anonymous 2009-12-06 14:20

Is OP for real? Seriously? How many OP impersonators are there in this thread?

Name: Anonymous 2009-12-06 14:24

>>30
OP MY ANUS

Name: Anonymous 2009-12-06 14:26

C# considered harmful

Name: Anonymous 2009-12-06 14:44

YHBT

Name: Anonymous 2009-12-06 14:59

>>1
You're trolling. That's what you're doing wrong.

Name: Anonymous 2009-12-07 4:43

>>33

I pretended to be trolled in order to troll you! HaHa!

Don't change these.
Name: Email:
Entire Thread Thread List