D
Daniel O'Connell
Two questions here:
1. Is there any particular reason why when using stackalloc, the code byte
*buffer = stackalloc byte[50]; works, but code like byte *buffer; buffer =
stackalloc byte[50]; is considered incorrect syntax? Was this an oversight,
a stylistic design, or is there a technical reason it won't work?
2. I was reading an older(circa 2000) question[1] posted to one of these
groups in which Eric Gunnerson mentions that the C# team was still talking
about a way to declare inlined arrays of base types in structures,
basically:
struct myStruct
{
int[5] fiveArrays; //5 ints all in a row in memory, obviously would need
better syntax
}
out of my own curiosity, has anything about this come up recently? Is the
team still considering it? Is something perhaps coming up(or is there
something there in 1.1 I've not managed to find?).
1. http://tinyurl.com/vi0s
1. Is there any particular reason why when using stackalloc, the code byte
*buffer = stackalloc byte[50]; works, but code like byte *buffer; buffer =
stackalloc byte[50]; is considered incorrect syntax? Was this an oversight,
a stylistic design, or is there a technical reason it won't work?
2. I was reading an older(circa 2000) question[1] posted to one of these
groups in which Eric Gunnerson mentions that the C# team was still talking
about a way to declare inlined arrays of base types in structures,
basically:
struct myStruct
{
int[5] fiveArrays; //5 ints all in a row in memory, obviously would need
better syntax
}
out of my own curiosity, has anything about this come up recently? Is the
team still considering it? Is something perhaps coming up(or is there
something there in 1.1 I've not managed to find?).
1. http://tinyurl.com/vi0s