473,662 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to 'ref' or 'out' at class level?

1 New Member
I have a class where one method receives a 'ref byte[]' or 'out byte[]' input from the client. I want to be able to modify that input from another method in the class, such that if the other method changes the instance, the client will see the new value.

I can't declare a 'ref byte[]' instance member, so how do I do it?
Feb 1 '07 #1
0 723

Sign in to post your reply or Sign up for a free account.

Similar topics

7
5469
by: Robert Lario | last post by:
For examples sake I have made up a very simple example. I have an object called foo1 which is of type foo. I want to be able to call a funtion called myfunc as follows: myfunc(ref foo1) here's the function : public void myfunc(ref object foo)
12
1459
by: Ori | last post by:
Hi, I have a simple question. Let say that i have 3 functions as following private main() { Object oTop = new Object(); }
2
1966
by: Tim Reynolds | last post by:
Team, We need some guidance here. We are developing a web service to expose to external system. We are not sure which is the best path to take. We have multiple input fields required and a few output fields. We are thinking to either 1) Make all input fields one class and have one parameter for our web service of this object type and make all output fields a second class and have return type of our web method return an object of this...
3
2691
by: mbaskey | last post by:
Hello... I have an object which has a nested object which need to look at the parent to return a value about it. Basically as below but when I put the ref method parameter to construct the nested class, I get the error message about "this" (the parent being readonly). When I leave out the ref keyword things compile, but I want to make sure I pass by reference so I can save memory. As you can see the
2
2319
by: SpotNet | last post by:
Hello NewsGroup, More out of curiosity, now I'd love to know which is a better way, if one can think in such terms in this context. If I implement the ChooseColor API function, the documentation states (briefly); BOOL ChooseColor(LPCHOOSECOLOR lpcc); lpcc is defined as "... Pointer to a CHOOSECOLOR structure that..." and you know or know where to read the rest of it.
3
2458
by: RitualDave | last post by:
This compiles and runs successfully in VS2005: ref class A { private: ~A() { this->!A(); } // private! !A() { } // private! }; ....
5
2674
by: Cmtk Software | last post by:
The following code: public __gc class MyClass { public: void MyFunc (int __gc* number); }; Generates the following metadata for C# when compiled in VC 2005 with the /clr:oldsyntax switch in a DLL project:
6
3678
by: semkaa | last post by:
Can you explain why using ref keyword for passing parameters works slower that passing parameters by values itself. I wrote 2 examples to test it: //using ref static void Main(string args) { List<TimeSpantimes = new List<TimeSpan>(); DateTime start; DateTime end; for (int j = 0; j < 1000; j++)
2
15136
by: Subodh | last post by:
Hi All Can we have a internal ref class in C++/CLI? when i try to declare a internal class in my project i get error message internal ref class MyError abstract sealed { public: static List<String^>^ GetLastErrorListEnglish(void);
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8856
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7365
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.