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

How to not pass an "out" parameter?

If a method takes an "out int" as a parameter is it possible to not pass
anything to that parameter? "null" and "out null" does not work.
Nov 15 '05 #1
2 1705
"None" <no**@nowhere.com> wrote in message
news:OU**************@TK2MSFTNGP09.phx.gbl...
If a method takes an "out int" as a parameter is it possible to not pass
anything to that parameter? "null" and "out null" does not work.


It would be handy if C# had something like the "anonymous variable" in
Prolog, which means, in essence, "allow a value to be placed here, but then
ignore it."
Nov 15 '05 #2
It's not possible to define a value type as null.

nalin
http://www.geocities.com/nalinperera
Michael A. Covington wrote:
"None" <no**@nowhere.com> wrote in message
news:OU**************@TK2MSFTNGP09.phx.gbl...
If a method takes an "out int" as a parameter is it possible to not pass
anything to that parameter? "null" and "out null" does not work.

It would be handy if C# had something like the "anonymous variable" in
Prolog, which means, in essence, "allow a value to be placed here, but then
ignore it."


Nov 15 '05 #3

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

Similar topics

1
by: Jim | last post by:
I have a class with several public member variables which I pass to a library function as an "out" parameter. I noticed that when the function returned, all the data was "lost". Do classes used...
8
by: Dave Veeneman | last post by:
Can I pass a method pass one of its out parameters to another method? C# is telling me I can't. Let's say I have two methods, FooManager and FooWorker. FooManager is part of a class that acts as...
1
by: mei xiao | last post by:
Hi, In my web service method (written in C#), I have a method like public string myMethod(out int test1, string test1) but when I use a web client to access this method, I got a run time...
1
by: Alex Chan | last post by:
Hi Group, I have written a window service wtih SAP.NET Connector which is to fulfil request from SAP client. SAP client will call a function exposed by my window service that has a big "out"...
11
by: dahuzizyd | last post by:
Hi all: I think I had a problem with using out parameter , why the instance of 'SubClass' can't convert to 'BaseClass' ? my code is : ---------------------------------------------- using System;...
1
by: rAinDeEr | last post by:
Hi, I am writing a stored procedure in db2, and I want to return a cursor as an out parameter of the stored procedure How can I accomplish that.... Thanks in advance RaInDeEr
7
by: John Layton | last post by:
Hi there, Is it possible to pass null to a function taking an "out" (or "ref") parameter in C#. I'd like to do something like the following (which doesn't compile of course). Thanks in advance....
1
by: obiwanjacobi | last post by:
Hi there, This is probably a really dump question but I'm stuck and need a leg- up with this. I'm writing a C++ interop layer that couples a managed plugin to an unmanaged host (specifically...
1
by: Jerico1313 | last post by:
I am returning the following error when i try to pass an oracle generated GUID through an out parameter. Here is the following error message from SQL+ worksheet: BEGIN Project.spm_DataInsertTest...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.