LINQ to SQL query
Tue, 7 Oct 2008 22:06:00 -0700
I'm struggling with LINQ to SQL queries. I have two tables with the following
relationship:
Activities (many) ---- (one) Types, where Types.Type_Id is a description for
Activities.Activity_Type. So I am trying to use Types as a look up table to
provide the description for a single character column in Activi ...
|
Differences between struct and class
Tue, 7 Oct 2008 20:04:03 -0700 (PDT)
what are the most usable, prominent, and must-to-know ones? ...
|
convert Int32 Unicode character code to its value
Tue, 07 Oct 2008 19:42:53 -0700
I have a simple question which, surprisingly a google search nor MSDN
can help me with. What is the best stream to use to parse a string,
character by character. All the streams return Int32, but I cannot find
a way to convert the Int32 to a character value. For instance,
StringReader.Read("1") returns 49, t ...
|
the use of interface is prohibited with struct
Tue, 7 Oct 2008 19:08:16 -0700 (PDT)
I am have pretty light types whose object I would like to use for
serialization thus ensure they obey the contract. Apparently, I cannot
use structs and have no choice, but to you use class.
thoughts? ...
|
Object and collection initializes.
Tue, 7 Oct 2008 21:00:26 -0500
It seems simple enough to use objects initializers to initialize object
properties and collection intitializers to initialize collection, what I
have not been able to figure out is a way to initialize object properties
and collections at the same time.
By the way, I don't have a need to do that, I am simply ...
|
Implicitly typed local variables, why local only?
Tue, 7 Oct 2008 20:53:53 -0500
Could someone tell me why is not possible to have Implicitly typed* field
level* variables? For example, why won't the following code compile?
class Program
{
var myString = "abc";
static void Main(string[] args)
{
}
}
If I try to compile this I get the following error: "The contextua ...
|
drop down menu selected w/ source code
Tue, 7 Oct 2008 17:59:44 -0700 (PDT)
Hi,
Currently, I can add values the drop down menu list inside the grid
view.
I want my value from SQL database to be select in the drop down menu
list (COLOR).
Also, once the user change to the value, update it back to database.
How can I achieve this? Thanks a lot.
select * from name;
+----+------ ...
|
|
|
Locking an ASP Control
Tue, 7 Oct 2008 15:02:01 -0700
I need to lock my ASP controls so that a user cannot make any changes. I've
tried the Enabled=False property, but this dims how the text looks. I don't
want to disable the control, I just want it locked. How can I lock a control
so that the user cannot change it's value until I allow them. In a Windows VB
ap ...
|
Division
Tue, 7 Oct 2008 14:50:10 -0700 (PDT)
Hello,
I have the following:
V = A / B * 100
V, A and B are integers. How can I be sure that the result would be an
integer.
And how can I assign a value to V in case B=0 creating a division by
0.
Thanks,
Miguel ...
|
The recommended approach to the none-of-the-above exception?
Tue, 7 Oct 2008 17:26:07 -0400
There are a few well-known (?) guidelines to throwing/creating exceptions
(paraphrasing my understanding of it):
1. Don't throw general types like Exception or ApplicationException.
2. Use existing exception classes where it makes sense (ArgumentException
etc).
3. Don't create custom exception types if they d ...
|