C# 3.0 auto-properties — useful or not?

C# 3.0 auto-properties — useful or not?

Note: This was posted when I was starting out C#. With 2014 knowledge, I can truly say that auto-properties are among the best things that ever happened to the C# language. I am used to create my prop…


Non Public Members for C# Interfaces

In C#, when you implement an interface, all members are implicitly public. Wouldn't it be better if we could specify the accessibility modifier(protected,internal,except private of course), or should…


algorithm - Red-Black Trees

I've seen binary trees and binary searching mentioned in several books I've read lately, but as I'm still at the beginning of my studies in Computer Science, I've yet to take a class that's really dea…


.net - InvalidOperationException while creating wcf web service instance

I have a WCF Web Service which is referenced from a class library. After the project is run, when creating the service client object from inside a class library, I receive an InvalidOperationExceptio…


functional programming - I just don't get continuations!

What are they and what are they good for? I do not have a CS degree and my background is VB6-> ASP-> ASP.NET/C#. Can anyone explain it in a clear and concise manner?…


How do you give a C# Auto-Property a default value?

How do you give a C# Auto-Property a default value? I either use the constructor, or revert to the old syntax. Using the Constructor: class Person{public Person(){Name="Defau…



sql - Possible to perform cross-database queries with postgres?

I'm going to guess that the answer is no based on the below error message(and this Google result), but is there anyway to perform a cross-database query using Postgres? databaseA=# select*from data…


How to Identify Postback event in Page_Load

We have some legacy code that needs to identify in the Page_Load which event caused the postback. At the moment this is implemented by checking the Request data like this... if(Request.Form["__EVENT…


c# - How can I access the backing variable of an auto-implemented property?

In the past we declared properties like this: public class MyClass{private int_age; public int Age{get{ return_age;}set{_age=value;}}}Now we can d…


c# - Auto-implemented getters and setters vs. public fields

I see a lot of example code for C# classes that does this: public class Point{public int x{get; set;}public int y{get; set;}} Or, in older code, the same with an explicit private ba…




not how example java for are and the field property