473,387 Members | 1,745 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,387 software developers and data experts.

VB style 'with' contruct

Hi all,

Is there a construct in C# that allow multiple operations on an object? ..
Similar to the VB 'WITH'?

Many Thx in Advance..

-BB
Nov 16 '05 #1
3 1053

"Brian Burgess" <bb********@hotmail.com> wrote in message
news:u%****************@tk2msftngp13.phx.gbl...
Hi all,

Is there a construct in C# that allow multiple operations on an object?
..
Similar to the VB 'WITH'?

Many Thx in Advance..


No.
Nov 16 '05 #2
Brian Burgess <bb********@hotmail.com> wrote:
Is there a construct in C# that allow multiple operations on an object? ..
Similar to the VB 'WITH'?


No. See
http://www.pobox.com/~skeet/csharp/faq/#vb.with

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #3
Instead of saying:

with myadapter.selectcommand
...

You could say:

SqlCommand c = myAdapter.SelectCommand;
c.CommandText = "...";
c.etc etc

Don't try it with a value type ;)

John

"Brian Burgess" <bb********@hotmail.com> wrote in message
news:u%****************@tk2msftngp13.phx.gbl...
Hi all,

Is there a construct in C# that allow multiple operations on an object?
..
Similar to the VB 'WITH'?

Many Thx in Advance..

-BB

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Douglas | last post by:
Can somone help me contruct a simple query Basically I want my query to extract records where the MOT_Due_Date is between the 1st Day of the current month and the date 6 weeks from the 1st day...
2
by: Marcin Floryan | last post by:
I am creating a custom control (Inherits UserControl) and my control containt a TextBox control. TextBox control has a Property called "ReadOnly". I would like to expose this property outside my...
8
by: Mike Mascari | last post by:
Hello. I have a query like: SELECT big_table.* FROM little_table, big_table WHERE little_table.x = 10 AND little_table.y IN (big_table.y1, big_table.y2); I have indexes on both big_table.y1...
11
by: nephish | last post by:
hello there, all. i have a difficult app that connects to a server to get information for our database here. this server is our access point to some equipment in the field that we monitor. ...
6
by: rongchaua | last post by:
Hi all, I want to change the style of a button. But I don't know how to do it. For example, I have already a button OK on form. I want to add these styles to this button (WS_CHILD || WS_VISIBLE ||...
0
by: JJ | last post by:
I want to add a comment header to each of my code files to show the sourcesafe version info (using the sourcesafe keywords $Revision, etc); eg something like this: #region Version Header///...
1
by: Dan2kx | last post by:
Bit of a strange one for ya here, i have table with Day, Month, Year and Weekday codes constructed by a loop that adds one to a recordset to construct a table of dates basically Day(sdt),...
4
by: furfey | last post by:
Is it possible to take an if contruct like this: if ($mmaaccess == "yes") { print "<img src='images/mma.jpg'>"; } else { print "<img src='images/oa.gif'>"; } and turn the whole thing into a...
2
by: Victory | last post by:
Do i need to use a special class if i need to code on computer with multiple processors. I need to make sure that all of the CPU resources are used to process the code. Is there a way to do this?...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.