Click here to Skip to main content
15,921,169 members
Home / Discussions / C#
   

C#

 
GeneralRe: Poor Points Pin
leppie6-Jan-05 11:53
leppie6-Jan-05 11:53 
GeneralRe: Poor Points Pin
TyronX7-Jan-05 4:45
TyronX7-Jan-05 4:45 
QuestionUrgent? Row Count Set Lock on Excel Column? Pin
macupryk6-Jan-05 9:53
macupryk6-Jan-05 9:53 
GeneralEXCEL question saving a file saving the the first column as read only Pin
macupryk6-Jan-05 9:51
macupryk6-Jan-05 9:51 
GeneralRe: EXCEL question saving a file saving the the first column as read only Pin
perlmunger6-Jan-05 11:24
perlmunger6-Jan-05 11:24 
GeneralC to C# Array address offsetting Pin
Anonymous6-Jan-05 9:17
Anonymous6-Jan-05 9:17 
GeneralRe: C to C# Array address offsetting Pin
Christian Graus6-Jan-05 12:26
protectorChristian Graus6-Jan-05 12:26 
GeneralRe: C to C# Array address offsetting Pin
Heath Stewart6-Jan-05 14:44
protectorHeath Stewart6-Jan-05 14:44 
You can do pointer arithmetic if you use an unsafe block (and tell the compiler to allow it with the /unsafe command-line switch) and pin data n memory:
//#!csc.exe /t:exe /unsafe Test.cs
 
using System;
 
class Test
{
  unsafe static void Main()
  {
    byte[] data = new byte[256];
    for (int i=0; i<data.Length; i++)
      data[i] = (byte)i;
 
    byte[] result = new byte[data.Length - 0x20];
 
    fixed (byte *b1 = &data[0x20])
      fixed (byte *b2 = &result[0])
        *b2 = *b1;
 
    Console.WriteLine(result[0]);
  }
}
See my reply to him if you're interesting in what you already recommend: Array.Copy.

What is confusing is that he says "copy" but is only referencing data in his example.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: C to C# Array address offsetting Pin
Heath Stewart6-Jan-05 14:36
protectorHeath Stewart6-Jan-05 14:36 
QuestionIs it possible to put a watermark on a form? Pin
Member 966-Jan-05 8:08
Member 966-Jan-05 8:08 
AnswerRe: Is it possible to put a watermark on a form? Pin
perlmunger6-Jan-05 9:14
perlmunger6-Jan-05 9:14 
GeneralRe: Is it possible to put a watermark on a form? Pin
Member 966-Jan-05 10:30
Member 966-Jan-05 10:30 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart6-Jan-05 14:29
protectorHeath Stewart6-Jan-05 14:29 
GeneralRe: Is it possible to put a watermark on a form? Pin
perlmunger6-Jan-05 15:12
perlmunger6-Jan-05 15:12 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart6-Jan-05 15:47
protectorHeath Stewart6-Jan-05 15:47 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart6-Jan-05 14:31
protectorHeath Stewart6-Jan-05 14:31 
GeneralRe: Is it possible to put a watermark on a form? Pin
perlmunger6-Jan-05 14:59
perlmunger6-Jan-05 14:59 
AnswerRe: Is it possible to put a watermark on a form? Pin
Heath Stewart6-Jan-05 15:44
protectorHeath Stewart6-Jan-05 15:44 
GeneralRe: Is it possible to put a watermark on a form? Pin
perlmunger6-Jan-05 16:04
perlmunger6-Jan-05 16:04 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart7-Jan-05 5:40
protectorHeath Stewart7-Jan-05 5:40 
GeneralRe: Is it possible to put a watermark on a form? Pin
Member 967-Jan-05 5:22
Member 967-Jan-05 5:22 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart7-Jan-05 5:31
protectorHeath Stewart7-Jan-05 5:31 
GeneralRe: Is it possible to put a watermark on a form? Pin
Member 967-Jan-05 8:39
Member 967-Jan-05 8:39 
GeneralRe: Is it possible to put a watermark on a form? Pin
Heath Stewart7-Jan-05 9:09
protectorHeath Stewart7-Jan-05 9:09 
GeneralRe: Is it possible to put a watermark on a form? Pin
Member 967-Jan-05 9:29
Member 967-Jan-05 9:29 

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.