so my boss wants me to learn C#

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

should i wear this tshirt on casual friday's while i learn C#

  • yes

  • XXL BEEF CHALUPA

  • no


Results are only viewable after voting.

PricklyPete

Lifer
Sep 17, 2002
14,582
162
106
Typically things like polymorphism aren't used much

My company may be the exception, but our main framework that we sell to customers (is an addon to SAP) uses Polymorphism extensively. In reality it forms the basis of how we deliver to the customer the base functionality/industry solution/customer driven development.
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
There are no verbs. I like verbs. Verbs get stuff done. OOP hides the verbs.

In a command-centric you would say "Change this to blue". In OOP you would say "This is now blue". I hate that.

ooooohhhh sounds like magic
/cant program my way to a "hello, world!"
 

Matthiasa

Diamond Member
May 4, 2009
5,755
23
81
Your 3rd condition would never get executed. Just sayin'.
Sometimes compilers don't like if something doesn't have a guarantied return, which that last line gives. Compilers are dumb and often don't understand the first two are all that's needed for that.

Though it's been a a while, so maybe I am just remember it wrong.
 
Jul 10, 2007
12,041
3
0
C# == Dead end that only leads to MS.

how?
it's similar to C++, which is similar to java, which means you can make a fairly simple transition.

look up ".net developer" on any tech job site and look at all the hits.
with Sharepoint, CRM and other MS web based apps growing, demand for .net programmers is only going to grow for the foreseeable future.
 

AyashiKaibutsu

Diamond Member
Jan 24, 2004
9,306
3
81
There are no verbs. I like verbs. Verbs get stuff done. OOP hides the verbs.

In a command-centric you would say "Change this to blue". In OOP you would say "This is now blue". I hate that.

In oop, you would have a method called ChangeColor belonging to whatever object you defined that you would pass the parameter Color.Blue. Just about every coding standard for OOP demands methods be named as verbs... Lost verbage found.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
There are no verbs. I like verbs. Verbs get stuff done. OOP hides the verbs.

In a command-centric you would say "Change this to blue". In OOP you would say "This is now blue". I hate that.

Not true!

tobor = new Robot() ;

tobor -> kill_all_humans() ;
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
not semantics... .net is a framework.

you dont write code in .net

you use .net libraries in your C# or J# code

The .Net framework is both the libraries and the common language runtime (which includes MSIL/CIL). It is theoretically possible to write directly in MSIL and compile using the MSIL assembler without ever writing code in c#/VB.net/etc.
 

IcePickFreak

Platinum Member
Jul 12, 2007
2,428
9
81
You programmer guys make things way too difficult...
piano-keys-with-notes.jpg


:awe:
 

KingGheedora

Diamond Member
Jun 24, 2006
3,248
1
81
Sometimes compilers don't like if something doesn't have a guarantied return, which that last line gives. Compilers are dumb and often don't understand the first two are all that's needed for that.

Though it's been a a while, so maybe I am just remember it wrong.

You are probably right, and I think most modern high level languages don't need an explicit default 'else' condition.

The widely accepted way to handle what you wrote is:

if (something == TRUE)
// Do stuff
else
// Do different stuff

If you have a true/false scenario you don't need to check for "something == false" if you've already checked for "something == true". It's implied that "something==false" if your code didn't execute the first condition branch.
 

halik

Lifer
Oct 10, 2000
25,696
1
0
Microsoft did a great job with the .net framework and c# directly. They took the best from borland delphi and removed the dead pascal language out of it.

Take the best part of C++ STL and Boost and remove retardation dealing with malloc and you have C#. That and support for generics, delegates and all the other stuff that 1980s wished for.
 

Red Squirrel

No Lifer
May 24, 2003
68,334
12,562
126
www.anyf.ca
While I'm not a big fan of .net as a whole because it's essentially a "windows only" platform while you could be using C/C++ and make stuff that runs natively in other OSes, it's sadly what the business world goes with, and out of all .net languages C# is probably the best one to work with. It's very easy to pickup and a properly written program will read like a book.

I manage a hobby project with about half a million lines of C# code and it's not that bad. TBH I would have converted that app to C++ but never really got around to it, and now it would make no sense as I've put too much work into it.