User Profile
Collapse
-
What is so alarming about that? Variables pretty much serve the same purpose as properties. When I wrote JAVA code 10 years ago I had to make use of private variables and modify them through set and get functions.... -
Hi Wim. I realy appreciate what you did. Am I correct in assuming that your reason for separating logic from the constructor is in to make it easier to add alternate constructors?
Thank you.Leave a comment:
-
I just realized that if I do a try ... catch some properties may get set while some won't, so I decided to eliminate the try ... catch block. Am I stuck with having to catch possible exceptions in the parent class?Leave a comment:
-
Best practices for object modelling
I am trying to write code for a class that has a couple of attributes that will can only be known upon creation. Because I think accessor functions (e.g. getSomething()) are outdate, I declared my attributes as "public readonly" in order to protect the attributes from getting modified yet still accessible by the parent class. I am not convinced that this is the best practice for this. Implementing properties seem like a bit of a waste of... -
Okay I just found out that it works if I use [db_name].dbo.[table_name]
Why oh why must Microsoft insist on their own non-standard ways????Leave a comment:
-
Specify database name in an SQL query
I need to specify the database name dynamically. I thought I can get away with doing something like "select * from [db_name].[table_name]" but apparently MS SQL does not work that way. Is there another way to specify the database name in an SQL query?
I could also probably switch databases with a "use" statement, but how do I do this with a SqlConnection?
No activity results to display
Show More
Leave a comment: