Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > vb to cSharp conversion

Reply
Thread Tools

vb to cSharp conversion

 
 
arun@greettech.com
Guest
Posts: n/a
 
      01-30-2007
Hi
Any one kno what is the C3 equivalent of vb
DataSetObj .Tables(0).Rows(0).Item("ID")

Thanks in Advance

 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      01-30-2007
"(E-Mail Removed)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...

> Any one kno what is the C3 equivalent of vb
> DataSetObj .Tables(0).Rows(0).Item("ID")


DataSetObj .Tables[0].Rows[0].Item["ID"];


 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      01-30-2007
Flip the () to [] and add a SemiColor on hte end:

DataSetObj .Tables[0].Rows[0].Item["ID"];


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

********************************************
Think outside the box!
********************************************
"(E-Mail Removed)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi
> Any one kno what is the C3 equivalent of vb
> DataSetObj .Tables(0).Rows(0).Item("ID")
>
> Thanks in Advance
>


 
Reply With Quote
 
arun@greettech.com
Guest
Posts: n/a
 
      01-30-2007
(Sorry for typo error)..

No that is not the correct answer. In c# there is no property Item...
Only Item array is there... that too we cant access like
DataSetObj .Tables(0).Rows(0).Item("ID")
We have to DataSetObj .Tables[0].Rows[0].ItemArray[0];

 
Reply With Quote
 
Petr Jankovský
Guest
Posts: n/a
 
      01-30-2007
DataSetObj .Tables[0].Rows[0]["ID"]

"(E-Mail Removed)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi
> Any one kno what is the C3 equivalent of vb
> DataSetObj .Tables(0).Rows(0).Item("ID")
>
> Thanks in Advance
>



 
Reply With Quote
 
Petr Jankovský
Guest
Posts: n/a
 
      01-30-2007
Ups plus semicolon at the end
DataSetObj .Tables[0].Rows[0]["ID"];
"Petr Jankovský" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> DataSetObj .Tables[0].Rows[0]["ID"]
>
> "(E-Mail Removed)" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
>> Hi
>> Any one kno what is the C3 equivalent of vb
>> DataSetObj .Tables(0).Rows(0).Item("ID")
>>
>> Thanks in Advance
>>

>
>



 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      01-30-2007

Other have missed this one (some of them)

whenever you see the word .Item in VB.NET, it usually (always?) is the
indexer in c#

so

someObject.Item("ID")
is
someObject["ID"]
in C#

so most times its just [] for (), except for the indexer (which is .Item in
vb.net)

DataSetObj .Tables[0].Rows[0]["ID"]



"(E-Mail Removed)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi
> Any one kno what is the C3 equivalent of vb
> DataSetObj .Tables(0).Rows(0).Item("ID")
>
> Thanks in Advance
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
tree view with asp.net and csharp? Vili ASP .Net 1 06-28-2004 04:33 PM
tool to make a class diagram from csharp Piero Massari ASP .Net 1 06-17-2004 09:14 PM
HOW TO: Create a single DataSet bound object used by 50 DropDownList box controls in the same web form. CSHARP Bill ASP .Net 3 03-01-2004 05:31 PM
ASP.NET not processing CSharp code CSDunn ASP .Net 5 01-14-2004 07:59 PM
Re: Project templatefor for ASP.NET in VB (Not CSharp), Natty Gur ASP .Net 0 07-27-2003 06:47 AM



Advertisments