Click here to Skip to main content
15,904,935 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to deploy a vsto solution to portal doc library Pin
jacktom5-Sep-06 20:44
jacktom5-Sep-06 20:44 
Questiongif image Pin
TAREQ F ABUZUHRI4-Sep-06 1:21
TAREQ F ABUZUHRI4-Sep-06 1:21 
AnswerRe: gif image Pin
TAREQ F ABUZUHRI4-Sep-06 1:21
TAREQ F ABUZUHRI4-Sep-06 1:21 
GeneralRe: gif image Pin
SeMartens4-Sep-06 1:34
SeMartens4-Sep-06 1:34 
QuestionSQLClient has cross object code? Pin
Jonathan van de Veen4-Sep-06 0:53
Jonathan van de Veen4-Sep-06 0:53 
AnswerRe: SQLClient has cross object code? Pin
Colin Angus Mackay4-Sep-06 1:06
Colin Angus Mackay4-Sep-06 1:06 
GeneralRe: SQLClient has cross object code? Pin
Jonathan van de Veen4-Sep-06 1:31
Jonathan van de Veen4-Sep-06 1:31 
GeneralRe: SQLClient has cross object code? Pin
Nader Elshehabi4-Sep-06 1:50
Nader Elshehabi4-Sep-06 1:50 
GeneralRe: SQLClient has cross object code? Pin
Jonathan van de Veen4-Sep-06 1:56
Jonathan van de Veen4-Sep-06 1:56 
JokeRe: SQLClient has cross object code? Pin
Nader Elshehabi4-Sep-06 5:22
Nader Elshehabi4-Sep-06 5:22 
JokeRe: SQLClient has cross object code? Pin
Jonathan van de Veen4-Sep-06 21:56
Jonathan van de Veen4-Sep-06 21:56 
QuestionSet Focus In MessageBox Popup Pin
ytubis4-Sep-06 0:05
ytubis4-Sep-06 0:05 
AnswerRe: Set Focus In MessageBox Popup Pin
Jonathan van de Veen4-Sep-06 0:54
Jonathan van de Veen4-Sep-06 0:54 
GeneralRe: Set Focus In MessageBox Popup Pin
ytubis4-Sep-06 1:10
ytubis4-Sep-06 1:10 
GeneralRe: Set Focus In MessageBox Popup Pin
S. Senthil Kumar4-Sep-06 1:21
S. Senthil Kumar4-Sep-06 1:21 
QuestionDiv Mod SQL Pin
TAREQ F ABUZUHRI3-Sep-06 22:03
TAREQ F ABUZUHRI3-Sep-06 22:03 
AnswerRe: Div Mod SQL Pin
mikone3-Sep-06 22:42
mikone3-Sep-06 22:42 
AnswerRe: Div Mod SQL Pin
John Petersen3-Sep-06 23:07
John Petersen3-Sep-06 23:07 
QuestionWindows service Pin
scharnier3-Sep-06 21:39
scharnier3-Sep-06 21:39 
AnswerRe: Windows service Pin
Jonathan van de Veen4-Sep-06 1:29
Jonathan van de Veen4-Sep-06 1:29 
AnswerRe: Windows service Pin
mav.northwind4-Sep-06 3:55
mav.northwind4-Sep-06 3:55 
AnswerRe: Windows service Pin
scharnier4-Sep-06 21:02
scharnier4-Sep-06 21:02 
QuestionPointers in C# Pin
mikone3-Sep-06 21:35
mikone3-Sep-06 21:35 
Hi,
i need something similar to a pointer in C#. C# itself has pointers implemented but they do not fit my needs.

I want to "map" a Variable to another one, in two different objects of a different class.

Pointing to a variable of a "user-defined" type is not a problem but pointing to a "managed" type is. It doesn't let me point to strins, integers or other built-in datatypes.

Thats why pointers do not work in my case - do you know any workaround for making the pointers work as i want them to or do you know another possibility to realize this?

Here is a little example of what i want to be able to do:

<br />
class MyClass<br />
{<br />
   public int AValue = null;<br />
}<br />
<br />
class AnotherClass<br />
{<br />
   public int * APointerToAValue = null;<br />
<br />
   public AnotherClass(ref int MappingVar)<br />
   {<br />
       unsafe<br />
       {<br />
           fixed (int * tmpptr = &MappingVar)<br />
           {<br />
              APointerToAValue = tmpptr;<br />
           }<br />
       }<br />
   }<br />
}<br />


Now when executing the following code

<br />
MyClass MyObj = new MyClass();<br />
AnotherClass AnotherObj = new AnotherClass(ref MyObj.AValue);<br />
<br />
AnotherObj.APointerToAValue = 3<br />
Console.WriteLine("Pointer: " + AnotherObj.APointerToAValue.ToString());<br />
Console.WriteLine("Value: " + MyObj.AValue.ToString());<br />
<br />
MyObj.AValue = 4<br />
Console.WriteLine("Pointer: " + AnotherObj.APointerToAValue.ToString());<br />
Console.WriteLine("Value: " + MyObj.AValue.ToString());<br />


this result should be produced:

<br />
Pointer: 3<br />
Value: 3<br />
Pointer: 4<br />
Value: 4<br />


Is there any way to manage it like this in C#? It doesn't has to be realized with pointers at all i just need a solution for the given problem!
AnswerRe: Pointers in C# Pin
Guffa3-Sep-06 22:01
Guffa3-Sep-06 22:01 
GeneralRe: Pointers in C# Pin
mikone3-Sep-06 22:25
mikone3-Sep-06 22:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.