Hello!
As I have understood this it means the following. Correct me if I'm wrong.
You store type objects in the array obj and the first one is refering to
a and the second is refering to b and the third is refering to c.
You store reference types of type object in the array but all of them is
refering to value types(a,b,c)
int32 a = 0;
Byte b = 0;
int16 c = 0;
object[] obj = {a,b,c};
It's the same as saying
object o1 = a;
object o2 = b;
object o3 = c;
//Tony 2 1007
On 22 Sep, 17:44, "Tony Johansson" <t.johans...@logica.comwrote:
Hello!
As I have understood this it means the following. Correct me if I'm wrong..
You store type objects in the array obj and the first one is refering to
a and the second is refering to b and the third is refering to c.
You store reference types of type object in the array but all of them is
refering to value types(a,b,c)
int32 *a = 0;
Byte *b = 0;
int16 *c = 0;
object[] obj = {a,b,c};
It's the same as saying
object o1 = a;
object o2 = b;
object o3 = c;
//Tony
Array is a reference type, which holds a series of reference objects
or value type objects.
to know more http://msdn.microsoft.com/en-us/libr...53(VS.71).aspx
-Cnu
Tony Johansson wrote:
Hello!
As I have understood this it means the following. Correct me if I'm wrong.
You store type objects in the array obj and the first one is refering to
a and the second is refering to b and the third is refering to c.
You store reference types of type object in the array but all of them is
refering to value types(a,b,c)
int32 a = 0;
Byte b = 0;
int16 c = 0;
object[] obj = {a,b,c};
It's the same as saying
object o1 = a;
object o2 = b;
object o3 = c;
//Tony
Yes, that is correct.
To store the values in the array, each value is boxed inside an object
that is allocated on the heap.
--
Göran Andersson
_____ http://www.guffa.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Captain Nemo |
last post by:
Hi
I'm trying to build a simple, one-dimensional array of prices, where the key
to each element is the product code.
So I start by executing a select query "SELECT Code, Price FROM Products",...
|
by: Tino Lange |
last post by:
Hi!
I identified a bottleneck in my programs.
I just want to "encrypt" data by easy xoring. Ok - that's no
encryption at all - I know. But it's hardly readable - and that's
enough :-) Just...
|
by: Hamish Dean |
last post by:
Hi. I want to pass an array through a function. how do i do this?
eg.
void SomeFunction(){
int Array;
Array = 1;
Array = 2;
Array = 3;
|
by: Harold Howe |
last post by:
Howdy,
1- Are property reads in effect volatile? Or is the compiler allowed to
optimize property reads away? ie
class foo
{
public int bar
{
get { return m_bar;}
|
by: Mike Bartels |
last post by:
Hi Everyone!
I have two Arrays A and B. Both arrays are byte arrays with 7 bytes each.
The contents of array A and B are the same
A = {1, 2, 3, 4, 5, 6, 7};
B = {1, 2, 3, 4, 5, 6, 7};
When...
| |
by: Rob Meade |
last post by:
Hi all,
I have a login page which has username and password fields, a login button,
and 2 validation controls (one for each field) - currently I have controls
to display to the summary if the...
|
by: jimi_xyz |
last post by:
I am kind of new to C sharp; I have a quick question I have multiple
text boxes 12 of them to be exact. What I want to do is fill them with
values that are in a array of integers. The way I am...
|
by: David Lowndes |
last post by:
I've got a project with a fair bit of mixed C++/CLI calling native
code, often passing raw pointers - and I'm worrying that we may have
occasions where we don't use pin_ptr when we need to.
...
|
by: paulf.johnson |
last post by:
Hi,
For some reason, my brain has gone to mush on a couple of things. Any
help would be appreciated.
I have an array and a field passed into a function (call it $v) which
is a string composed...
|
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...
|
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...
| |
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: 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,...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |