473,378 Members | 1,507 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

'generics' + linq = ?

hello everyone :)
I have a simple question

Expand|Select|Wrap|Line Numbers
  1. DataClasses1DataContext db = new DataClasses1DataContext(conn);
  2. var tab = new TABLE_in_DB();
now, is there a way to asigne a value to the one of the columns/variables without knowing its name ?

normaly you would asign a value like that:
Expand|Select|Wrap|Line Numbers
  1. tab.Var = "some value";
but is there a way of doing this more like:
Expand|Select|Wrap|Line Numbers
  1. tab["columnNameString"] = "some value";
Dec 5 '08 #1
0 814

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Marshal | last post by:
/////////////////////////////////////////////////////////////////////////////////////////////// /// CONSTRAINTS ON GENERICS //////////////////////////////////////////////////// public class...
23
by: Luc Vaillant | last post by:
I need to initialise a typed parameter depending of its type in a generic class. I have tried to use the C++ template form as follow, but it doesn't work. It seems to be a limitation of generics...
12
by: Michael S | last post by:
Why do people spend so much time writing complex generic types? for fun? to learn? for use? I think of generics like I do about operator overloading. Great to have as a language-feature, as...
6
by: nick_nw | last post by:
Hi, What significant advantages do generics give me over passing objects around as 'object' and casting when needed? I was asked this recently and started off by saying, "well of course...
9
by: sloan | last post by:
I'm not the sharpest knife in the drawer, but not a dummy either. I'm looking for a good book which goes over Generics in great detail. and to have as a reference book on my shelf. Personal...
13
by: rkausch | last post by:
Hello everyone, I'm writing because I'm frustrated with the implementation of C#'s generics, and need a workaround. I come from a Java background, and am currently writing a portion of an...
6
by: Frank Rizzo | last post by:
I am trying to create a parametrized generic object, but the compiler won't let me. Is this just the way it is? The class has a constraint that says all classes must inherit from BusinessBase,...
9
by: =?Utf-8?B?cmF1bGF2aQ==?= | last post by:
Hi all: after reading different places/sites about linq... I ran into these questions: 1. What framework do we need to run linq ? (does it depend on what version of visual studio we have?) how...
2
by: shapper | last post by:
Hello, I have the following method: public static IEnumerable GetRoles(CultureInfo culture, bool open) { switch (culture.TwoLetterISOLanguageName.ToLower()) { case "en": return new { new {...
4
by: CSharper | last post by:
I have a sample as shown in the bottom on the mail. I am trying to see without changing anything in the way the As and Bs handled. I want to make it DRY using generics. I am really interested in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.