Click here to Skip to main content
15,898,222 members
Home / Discussions / C#
   

C#

 
GeneralRe: .NET Windows Service Installer Pin
TigerNinja_17-Oct-08 3:09
TigerNinja_17-Oct-08 3:09 
JokeRe: .NET Windows Service Installer Pin
PIEBALDconsult16-Oct-08 16:57
mvePIEBALDconsult16-Oct-08 16:57 
GeneralRe: .NET Windows Service Installer Pin
TigerNinja_17-Oct-08 3:11
TigerNinja_17-Oct-08 3:11 
Questioncapture output from windows program Pin
Axell16-Oct-08 10:40
Axell16-Oct-08 10:40 
AnswerRe: capture output from windows program Pin
Dave Kreskowiak16-Oct-08 10:52
mveDave Kreskowiak16-Oct-08 10:52 
AnswerRe: capture output from windows program Pin
PIEBALDconsult16-Oct-08 16:58
mvePIEBALDconsult16-Oct-08 16:58 
GeneralRe: capture output from windows program Pin
Simon P Stevens16-Oct-08 22:06
Simon P Stevens16-Oct-08 22:06 
QuestionHow can I change these VB.net to C# codes? Pin
ATC16-Oct-08 10:05
ATC16-Oct-08 10:05 
I have the following VB.net codes:

<br />
        da = New OleDbDataAdapter(strSQL, dbConn)<br />
        dt = New DataTable<br />
        da.Fill(dt)<br />
<br />
        Dim rows As DataRow<br />
        cnt = dt.Rows.Count()<br />
<br />
        If cnt > 0 Then<br />
            For Each rows In dt.Rows<br />
                Total += rows.Item("Total")<br />
            Next<br />
        End If<br />


I changed to these C#:

<br />
	da = new OleDbDataAdapter(strSQL, CGlobal.dbConn);<br />
	dt = new DataTable();<br />
	da.Fill(dt);<br />
<br />
        cnt = dt.Rows.Count;<br />
<br />
        DataRow rows = default(DataRow); <br />
<br />
        if (cnt > 0)<br />
        {<br />
            foreach (rows in dt.Rows) <br />
               Total += rows.Item("Total");          <br />
       }<br />


And I have the error in in above, can anyone help to correct my C#?

Thank D'Oh! | :doh:
AnswerRe: How can I change these VB.net to C# codes? Pin
Pete O'Hanlon16-Oct-08 10:09
mvePete O'Hanlon16-Oct-08 10:09 
GeneralRe: How can I change these VB.net to C# codes? Pin
ATC16-Oct-08 10:21
ATC16-Oct-08 10:21 
GeneralRe: How can I change these VB.net to C# codes? Pin
DaveyM6916-Oct-08 10:26
professionalDaveyM6916-Oct-08 10:26 
GeneralRe: How can I change these VB.net to C# codes? Pin
ATC16-Oct-08 10:38
ATC16-Oct-08 10:38 
GeneralRe: How can I change these VB.net to C# codes? Pin
Pete O'Hanlon16-Oct-08 21:57
mvePete O'Hanlon16-Oct-08 21:57 
AnswerRe: How can I change these VB.net to C# codes? Pin
Paul Conrad16-Oct-08 10:59
professionalPaul Conrad16-Oct-08 10:59 
AnswerRe: How can I change these VB.net to C# codes? Pin
Dave Doknjas16-Oct-08 13:21
Dave Doknjas16-Oct-08 13:21 
QuestionEnhancing UI layout using TableLayoutPanel Programmatically? Pin
Member 232448316-Oct-08 10:05
Member 232448316-Oct-08 10:05 
AnswerRe: Enhancing UI layout using TableLayoutPanel Programmatically? Pin
Dave Kreskowiak16-Oct-08 10:47
mveDave Kreskowiak16-Oct-08 10:47 
GeneralRe: Enhancing UI layout using TableLayoutPanel Programmatically? Pin
Member 232448316-Oct-08 11:35
Member 232448316-Oct-08 11:35 
GeneralRe: Enhancing UI layout using TableLayoutPanel Programmatically? Pin
Dave Kreskowiak16-Oct-08 12:04
mveDave Kreskowiak16-Oct-08 12:04 
GeneralRe: Enhancing UI layout using TableLayoutPanel Programmatically? Pin
Member 232448317-Oct-08 9:29
Member 232448317-Oct-08 9:29 
GeneralRe: Enhancing UI layout using TableLayoutPanel Programmatically? Pin
Dave Kreskowiak17-Oct-08 12:49
mveDave Kreskowiak17-Oct-08 12:49 
QuestionReference Question Pin
SRogers8816-Oct-08 7:49
SRogers8816-Oct-08 7:49 
AnswerRe: Reference Question Pin
Dave Kreskowiak16-Oct-08 10:42
mveDave Kreskowiak16-Oct-08 10:42 
GeneralRe: Reference Question Pin
SRogers8816-Oct-08 10:53
SRogers8816-Oct-08 10:53 
GeneralRe: Reference Question Pin
Dave Kreskowiak16-Oct-08 11:58
mveDave Kreskowiak16-Oct-08 11:58 

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.