with keyword in c#

how to use with Keyword

Page 1 of 1

1 Replies - 1276 Views - Last Post: 21 January 2010 - 02:11 AM Rate Topic: -----

#1 sri[email protected]  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 21-January 10

with keyword in c#

Post icon  Posted 21 January 2010 - 01:02 AM

How to use with keyword in c# i have vbcode example

Private Sub btnLookupCust_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLookupCust.Click
        With frmCustomerLookup
            .ShowDialog()

            txtLastName.Text = CurrCust.Lastname
            txtFirstName.Text = CurrCust.Firstname
        End With
    End Sub
 

i want to convert it into c# language please help me as earily as possible

Is This A Good Question/Topic? 0
  • +

Replies To: with keyword in c#

#2 crepitus  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 85
  • View blog
  • Posts: 383
  • Joined: 08-September 09

Re: with keyword in c#

Posted 21 January 2010 - 02:11 AM

There is no equivalent to With in C#, just do it verbosely.

frmLookup.ShowDialog();
txtFirstName.Text = CurrCust.LastName
txtFirstName.Text = CurrCust.FirstName

http://blogs.msdn.co...3/11/87817.aspx
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1