Why does this generate a compiler error: class X { public void Add(string str) { Console.WriteLine(str); } }
I like reading about programming theories, so could you tell me if there is any object-oriented static typed language that allow variables to have a few types?
It seems that the C# 3.0 object initializer syntax allows one to exclude the open/close pair of parentheses in the constructor when there is a parameterless constructor existing. Example:
The pre/post increment/decrement operator (++ and --) are pretty standard programing language syntax (for procedural and object-oriented languages, at least).
(Sorry if this sounds like a rant, but it\'s a real question and I\'d appreciate real answers) I understand that since C is so old, it might have not made sense to add it back then(MMX didn\'t even e
I am working on a new language, targeted for web development, embeding into applications, distributed applications, high-reliability software (but this is for distant future).
The standard does not allow code like this: namespace Hello::World { //Things that are in namespace Hello::World
Why is new/override required on abstract methods but not on virtual methods? Sample 1: abstract class ShapesClass
I recently had a friend tell me \"see perl was never designed to be fast\" Is that true? The relevant piece of information I can find is this from Wikipedia:
Would it make sense to have a \"constify\" operation in C/C++ that makes a variable const? Here is an example where it could be useful, where obviously we don\'t want to declare it const yet in the f