PDA

View Full Version : C# (C Sharp) concepts and doubts



munishvit
October 22nd, 2009, 06:18 AM
Hello friends,

In this thread, anybody can ask any doubt related to C# programming.

In order to make this more readable, let's follow some rules:
1. If you are posting a doubt, then start your post with "DOUBT NO. <n>", where 'n' will be next natural number as compared to last 'doubt' posted.
2. If you are posting a reply, then start your post with "---Reply to <n>---", where 'n' is 'doubt' no. to which you are replying.

munishvit
October 22nd, 2009, 06:22 AM
DOUBT NO. 1

Why don't we make all methods of a class to be 'static'. What can be the use of keeping a method non-static?

OpenGuard
October 22nd, 2009, 06:24 AM
DOUBT NO.2

Is it copyrighted by Microsoft and can they take it back whenever they want ( sue those who want to release commercial software without buying licenses ) ?

unknownPoster
October 22nd, 2009, 06:53 AM
DOUBT NO.2

Is it copyrighted by Microsoft and can they take it back whenever they want ( sue those who want to release commercial software without buying licenses ) ?

That has been discussed so many times here that every mention of it is put in Recurring discussions...

Regardless, the entire concept of this thread confuses me.

OpenGuard
October 22nd, 2009, 06:56 AM
That has been discussed so many times here that every mention of it is put in Recurring discussions...

Regardless, the entire concept of this thread confuses me.

And that's why you shouldn't answer ( or at least point to the place where this have been already answered ) ?

unknownPoster
October 22nd, 2009, 07:00 AM
And that's why you shouldn't answer ( or at least point to the place where this have been already answered ) ?

Honestly, yes. I believe that self-sufficiency and motivation are keys to a good life. It's also a sticky, and if you can't find that kind of thing...well, I'm not sure what to say.

http://ubuntuforums.org/showthread.php?t=1200946

OpenGuard
October 22nd, 2009, 07:08 AM
Honestly, yes. I believe that self-sufficiency and motivation are keys to a good life. It's also a sticky, and if you can't find that kind of thing...well, I'm not sure what to say.

http://ubuntuforums.org/showthread.php?t=1200946

If only that would be so simple. Sticky doesn't explain anything - Ubuntu and Mono is not what the question was about.

unknownPoster
October 22nd, 2009, 07:15 AM
Considering that mono is the Linux implementation of C#, I'd say it's very pertinent to the topic.

Regardless, Microsoft owns C# just as much as Sun owns Java.

OpenGuard
October 22nd, 2009, 07:20 AM
Regardless, Microsoft owns C# just as much as Sun owns Java.

What makes you think so ( I don't disagree .. just want to see something black-on-white ) ? I was reading something about it's Community Promise and patents, but honestly .. explanations were too geeky for me.

unknownPoster
October 22nd, 2009, 07:29 AM
Essentially, a programming language is just Intellectual Property(IP) and IP ownership rights are tricky and complicated to determine. Although Sun has released much of the Java platform under the GPL, an open-source license. Sun Microsystems is still the major decision maker in the development of the Java Platform. Java is copyrighted, and it's probably patented as well. Here's an article by RMS on the topic, although it's three years old:

http://www.groklaw.net/article.php?story=20060524112209579

From a purely objective point of view, I see C# and Java being two fairly similar tools with the same goals in mind.

In my subjective opinion, I don't care enough to get caught up in the Microsoft ownership debate.

munishvit
October 22nd, 2009, 12:50 PM
DOUBT NO. 1

Why don't we make all methods of a class to be 'static'. What can be the use of keeping a method non-static?

Can anybody clarify my doubt?

directhex
October 22nd, 2009, 01:09 PM
Can anybody clarify my doubt?

Um....... because it's not exactly OO if you're going to remove the ability to instantiate objects (or use methods & properties on instantiated objects, anyway)?

Instances are *useful*

cszikszoy
October 22nd, 2009, 06:49 PM
What makes you think so ( I don't disagree .. just want to see something black-on-white ) ?

This is about as clear of an explanation as you'll get: http://tirania.org/blog/archive/2009/Jul-06.html


Essentially, a programming language is just Intellectual Property(IP) and IP ownership rights are tricky and complicated to determine.
....
the Microsoft ownership debate.

Microsoft does not "own" the language. C# is actually an EMCA standard (reference (http://www.ecma-international.org/publications/standards/Ecma-334.htm)), not Microsoft IP. .NET is Microsoft IP. If you read the community promise (and the .pdf lined to at the bottom of the reference link, you'll see that Microsoft has agreed to license "on a non-discriminatory basis, to any party requesting" the implementation of this standard. That's why you can even use Mono on Windows.

CptPicard
October 22nd, 2009, 07:06 PM
This is such a wrong way to attempt to use the forum... all discussion topics ("doubts"... :) ) should really go under their own threads so that they are easily viewable, and the quote tags are there for a reason for referral to what has been said previously...