Re: 'References' (pointers) in C# (without using unsafe)
From: Magnus Lidbom (magnus_lidbom_at_hotmail.com)
Date: 02/05/04
- Next message: Antenna: "Re: convert to c#"
- Previous message: Antenna: "Re: Form Input Focus"
- In reply to: _ed_: "'References' (pointers) in C# (without using unsafe)"
- Next in thread: _ed_: "Re: 'References' (pointers) in C# (without using unsafe)"
- Reply: _ed_: "Re: 'References' (pointers) in C# (without using unsafe)"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 05 Feb 2004 11:07:31 +0100
On Thu, 05 Feb 2004 04:00:48 -0500, _ed_ <_nomail@_nospam.com> wrote:
>I'd like to build a class or struct composed of pointers to variables.
>Does this require dropping into an 'unsafe' block, or is there a
>trick?
>
> ....
> int value1 = 1234;
> bool value2 = false;
> string value3 = "Hello Detroit";
>
> public class x {
> int *adr_value1 = &value1;
> bool *adr_value2 = &value2;
> string *adr_value3 = &value3;
> }
Why exactly do you feel you need pointers? What's wrong with
references for what you intend?
/Magnus Lidbom
- Next message: Antenna: "Re: convert to c#"
- Previous message: Antenna: "Re: Form Input Focus"
- In reply to: _ed_: "'References' (pointers) in C# (without using unsafe)"
- Next in thread: _ed_: "Re: 'References' (pointers) in C# (without using unsafe)"
- Reply: _ed_: "Re: 'References' (pointers) in C# (without using unsafe)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|