Click here to Skip to main content
16,017,015 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to retrieve the initial window state? Pin
Heath Stewart11-Nov-03 6:54
protectorHeath Stewart11-Nov-03 6:54 
GeneralRe: How to retrieve the initial window state? Pin
Alvaro Mendez11-Nov-03 8:48
Alvaro Mendez11-Nov-03 8:48 
GeneralRe: How to retrieve the initial window state? Pin
Heath Stewart11-Nov-03 8:53
protectorHeath Stewart11-Nov-03 8:53 
GeneralComputer name Pin
Chathura10-Nov-03 12:10
Chathura10-Nov-03 12:10 
GeneralRe: Computer name Pin
Heath Stewart11-Nov-03 3:43
protectorHeath Stewart11-Nov-03 3:43 
GeneralActive Directory Adding Pin
Chathura10-Nov-03 11:53
Chathura10-Nov-03 11:53 
Questiona way to use arrays with negative pointers? Pin
Demokritos10-Nov-03 11:26
Demokritos10-Nov-03 11:26 
AnswerRe: a way to use arrays with negative pointers? Pin
Wjousts10-Nov-03 11:39
Wjousts10-Nov-03 11:39 
You could create your own class that wraps a regular array and then use the indexing property to translate your negative indexes into positive indexes in the array that you are wrapping. Something like this:

public class NegativeArray
{
    private Array myArray;
    private int indexOffset;

    public object this[int i]
    {
        get
        {
            return myArray[i+indexOffset];
        }
        set
        {
            myArray[i+indexOffset] = value;
        }
    }
    // You'd have to fill in the rest yourself ;)
}


Where indexOffset is the amount you'd have to add to your negative index to get a positive index, or to put it another way, an indexOffset of 10 would let you have an index down to -10, which would translate into the index 0 of the array you're wrapping.
You might also think about inheriting from the Array class instead of wrapping. That might actually be better.

Can't imagine why you'd need to do this though.....
GeneralRe: a way to use arrays with negative pointers? Pin
Demokritos11-Nov-03 12:40
Demokritos11-Nov-03 12:40 
GeneralConvert string to class (sort of) Pin
MrEyes10-Nov-03 6:30
MrEyes10-Nov-03 6:30 
GeneralRe: Convert string to class (sort of) Pin
Wjousts10-Nov-03 7:06
Wjousts10-Nov-03 7:06 
GeneralRe: Convert string to class (sort of) Pin
MrEyes10-Nov-03 7:09
MrEyes10-Nov-03 7:09 
GeneralRe: Convert string to class (sort of) Pin
Heath Stewart10-Nov-03 7:44
protectorHeath Stewart10-Nov-03 7:44 
GeneralA couple of line drawing questions... Pin
DoofToo10-Nov-03 6:12
DoofToo10-Nov-03 6:12 
GeneralRe: A couple of line drawing questions... Pin
mhmoud rawas11-Nov-03 1:36
mhmoud rawas11-Nov-03 1:36 
GeneralPrinting.. Pin
Amirjalaly10-Nov-03 5:50
Amirjalaly10-Nov-03 5:50 
GeneralRe: Printing.. Pin
Heath Stewart10-Nov-03 6:01
protectorHeath Stewart10-Nov-03 6:01 
GeneralRemoting and Events Pin
CillyMe10-Nov-03 5:08
CillyMe10-Nov-03 5:08 
GeneralRe: Remoting and Events Pin
Heath Stewart10-Nov-03 5:39
protectorHeath Stewart10-Nov-03 5:39 
GeneralRe: Remoting and Events Pin
CillyMe10-Nov-03 5:44
CillyMe10-Nov-03 5:44 
GeneralRe: Remoting and Events Pin
Heath Stewart10-Nov-03 5:51
protectorHeath Stewart10-Nov-03 5:51 
GeneralRe: Remoting and Events Pin
CillyMe10-Nov-03 14:37
CillyMe10-Nov-03 14:37 
GeneralRe: Remoting and Events Pin
Heath Stewart11-Nov-03 2:55
protectorHeath Stewart11-Nov-03 2:55 
GeneralRe: Remoting and Events Pin
LongRange.Shooter10-Nov-03 6:04
LongRange.Shooter10-Nov-03 6:04 
GeneralEnumerating Data Sources in C# Pin
Inam10-Nov-03 4:41
Inam10-Nov-03 4:41 

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.