Click here to Skip to main content
15,913,939 members
Home / Discussions / C#
   

C#

 
AnswerRe: Interacting with Dallas IButton form C# Pin
Heath Stewart15-Dec-05 21:21
protectorHeath Stewart15-Dec-05 21:21 
Questionwhy doesnt this xml load into an xmldoc ? Pin
g00fyman15-Dec-05 19:36
g00fyman15-Dec-05 19:36 
AnswerRe: why doesnt this xml load into an xmldoc ? Pin
S. Senthil Kumar15-Dec-05 20:41
S. Senthil Kumar15-Dec-05 20:41 
GeneralRe: why doesnt this xml load into an xmldoc ? Pin
g00fyman16-Dec-05 15:20
g00fyman16-Dec-05 15:20 
Questionnewbie in c# Pin
yaminilathatv15-Dec-05 19:36
yaminilathatv15-Dec-05 19:36 
AnswerRe: newbie in c# Pin
Vikram A Punathambekar15-Dec-05 21:49
Vikram A Punathambekar15-Dec-05 21:49 
GeneralRe: newbie in c# Pin
yaminilathatv15-Dec-05 22:23
yaminilathatv15-Dec-05 22:23 
AnswerRe: newbie in c# Pin
J4amieC15-Dec-05 21:49
J4amieC15-Dec-05 21:49 
In your VB Example you were iterating over the Rows in the Emp table:

for each dr in ds.tables("Emp").Rows

In your C# example, you are itterating over the Tables in the dataset

foreach ( DataTable table in ds.Tables )

and then itterating over the Rows in the Emp table

foreach (DataRow dr in ds.Tables["Emp"].Rows)

which is pointless, because you only read from the Emp table! So you'll be reading once for every table in your dataset.

Your real problem is that as above you named the rows dr, but then you try to read from a variable called row

<br />
TextBox1.Text = row["Empno"].ToString


In addition, C# requires the use of the open and closed brackets for method calls (one small difference from VB, which allows you to call methods without parenthesis)
GeneralRe: newbie in c# Pin
J4amieC15-Dec-05 21:51
J4amieC15-Dec-05 21:51 
GeneralRe: newbie in c# Pin
yaminilathatv15-Dec-05 22:27
yaminilathatv15-Dec-05 22:27 
GeneralRe: newbie in c# Pin
J4amieC16-Dec-05 0:25
J4amieC16-Dec-05 0:25 
GeneralRe: newbie in c# Pin
yaminilathatv16-Dec-05 21:55
yaminilathatv16-Dec-05 21:55 
QuestionSchema Pin
Mahi.Ragava15-Dec-05 18:00
Mahi.Ragava15-Dec-05 18:00 
QuestionCheckbox Arrays... Pin
flicktom15-Dec-05 17:48
flicktom15-Dec-05 17:48 
AnswerRe: Checkbox Arrays... Pin
flicktom15-Dec-05 18:26
flicktom15-Dec-05 18:26 
AnswerRe: Checkbox Arrays... Pin
J. Dunlap15-Dec-05 18:26
J. Dunlap15-Dec-05 18:26 
QuestionHit testing problem Pin
t800t815-Dec-05 15:44
t800t815-Dec-05 15:44 
AnswerRe: Hit testing problem Pin
Heath Stewart15-Dec-05 21:35
protectorHeath Stewart15-Dec-05 21:35 
GeneralRe: Hit testing problem Pin
t800t815-Dec-05 22:01
t800t815-Dec-05 22:01 
Question[URGENT] REGEX question Pin
Sam 200615-Dec-05 15:20
Sam 200615-Dec-05 15:20 
AnswerRe: [URGENT] REGEX question Pin
Christian Graus15-Dec-05 16:12
protectorChristian Graus15-Dec-05 16:12 
Questionopen an executable file on remote machine using WMI Pin
Erick Shuai15-Dec-05 15:12
Erick Shuai15-Dec-05 15:12 
AnswerRe: open an executable file on remote machine using WMI Pin
Dave Kreskowiak15-Dec-05 16:22
mveDave Kreskowiak15-Dec-05 16:22 
QuestionExists an interface for Parse(string value) method and ToString(string format)? Pin
machocr15-Dec-05 14:21
machocr15-Dec-05 14:21 
AnswerRe: Exists an interface for Parse(string value) method and ToString(string format)? Pin
[Marc]15-Dec-05 14:46
[Marc]15-Dec-05 14:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.