473,405 Members | 2,171 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,405 software developers and data experts.

If Not myDataSet Is Nothing...

I'm rewriting a vb client app to C# and need to convert:

"If Not myDataSet Is Nothing Then"

I can't seem to get the syntax right for this one...
What would such a thing look like in C#?
Nov 17 '05 #1
3 1906
if (myDataSet != null)
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
"David" wrote:
I'm rewriting a vb client app to C# and need to convert:

"If Not myDataSet Is Nothing Then"

I can't seem to get the syntax right for this one...
What would such a thing look like in C#?

Nov 17 '05 #2
If (myDataSet != null)
{

}
"David" <Da***@discussions.microsoft.com> wrote in message
news:AA**********************************@microsof t.com...
I'm rewriting a vb client app to C# and need to convert:

"If Not myDataSet Is Nothing Then"

I can't seem to get the syntax right for this one...
What would such a thing look like in C#?

Nov 17 '05 #3
Thanks for your reply.
The check for null didn't work, as the dataset has been declared at the time
of the check and null is returning false. What I finally did was put in a
count of tables within the dataset. If the count is 0, it hasn't yet been
populated.

David

"Bela Istok" wrote:
If (myDataSet != null)
{

}
"David" <Da***@discussions.microsoft.com> wrote in message
news:AA**********************************@microsof t.com...
I'm rewriting a vb client app to C# and need to convert:

"If Not myDataSet Is Nothing Then"

I can't seem to get the syntax right for this one...
What would such a thing look like in C#?


Nov 17 '05 #4

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

Similar topics

96
by: BadPony | last post by:
Anyone using Peoplesoft on a Federated UDB (shared nothing)Environment on Open System Platforms? Preferably AIX, but any war stories would be good. TEA EB-C
24
by: Hardy | last post by:
I'm pretty new in this field. when reading some 70x material, I met with this term but cannot catch its accurate meaning. who can help me? thanks in advance:)~
6
by: Bob Day | last post by:
VS 2003 The documentation says " Nothing keyword represents the default value of any data type" this is simply not true and causing a lot of problems. 1) Consider an SQL table of 3 columns: ...
26
by: Bob Day | last post by:
VS 2003, vb.net, sql native (MSDE)... I have railed against the inconsistency of the Nothing key word. The documentation says is will assign a default value for any datatype...well, not...
4
by: David Schwartz | last post by:
Seems that setting an object = Nothing no longer does anything in .NET. Garbage collection destroys the object eventually. So, does it ever make sense to set an object = Nothing in .NET? Thanks.
5
by: John A Grandy | last post by:
do these mean the same thing ? Dim s As String ..... If s Is Nothing Then ..... If s = Nothing Then .....
8
by: Tiraman | last post by:
Hi , i would like to get some explanation about using the Obj = Nothing . For example , I have a function that hold a local object like in this example public function Test() dim objMyCol...
12
by: Mike Eaton | last post by:
Hi all, What do people regard as the best practice with respect to freeing object references when you're done with them? Some people I've worked with in the past suggested that if you create an...
0
by: sennopati | last post by:
Dude! I created datagridview object and put one procedure and use one event in my form. The PRocedure SaveRecord have command like this: Mybindingsource.endedit() if MyDataSet.haschange then...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.