Click here to Skip to main content
15,905,679 members
Home / Discussions / C#
   

C#

 
AnswerRe: Retrieve timetable from website to send out as SMS Pin
Christian Graus29-Sep-09 22:08
protectorChristian Graus29-Sep-09 22:08 
QuestionHide window in taskbar Pin
polycom12329-Sep-09 21:52
polycom12329-Sep-09 21:52 
AnswerRe: Hide window in taskbar Pin
stancrm29-Sep-09 22:00
stancrm29-Sep-09 22:00 
AnswerRe: Hide window in taskbar Pin
Calla29-Sep-09 22:02
Calla29-Sep-09 22:02 
AnswerRe: Hide window in taskbar Pin
freakyit29-Sep-09 22:05
freakyit29-Sep-09 22:05 
GeneralRe: Hide window in taskbar Pin
Calla29-Sep-09 22:09
Calla29-Sep-09 22:09 
GeneralRe: Hide window in taskbar Pin
polycom12329-Sep-09 22:29
polycom12329-Sep-09 22:29 
GeneralRe: Hide window in taskbar Pin
Paramhans Dubey29-Sep-09 22:40
professionalParamhans Dubey29-Sep-09 22:40 
GeneralRe: Hide window in taskbar Pin
polycom12329-Sep-09 23:36
polycom12329-Sep-09 23:36 
Questionreading Outlook Calendar in C Pin
Jassim Rahma29-Sep-09 21:52
Jassim Rahma29-Sep-09 21:52 
AnswerRe: reading Outlook Calendar in C Pin
Christian Graus29-Sep-09 22:08
protectorChristian Graus29-Sep-09 22:08 
Questionhelp needed for voip Pin
aamirzada29-Sep-09 21:31
aamirzada29-Sep-09 21:31 
AnswerRe: help needed for voip Pin
Calla29-Sep-09 22:07
Calla29-Sep-09 22:07 
GeneralRe: help needed for voip Pin
aamirzada29-Sep-09 22:23
aamirzada29-Sep-09 22:23 
GeneralRe: help needed for voip Pin
J4amieC29-Sep-09 23:38
J4amieC29-Sep-09 23:38 
GeneralRe: help needed for voip Pin
aamirzada30-Sep-09 0:44
aamirzada30-Sep-09 0:44 
AnswerRe: help needed for voip Pin
Christian Graus29-Sep-09 22:10
protectorChristian Graus29-Sep-09 22:10 
Questiondetect javascript code for google ad sense Pin
Anil Veeraghattapu 429-Sep-09 21:29
Anil Veeraghattapu 429-Sep-09 21:29 
AnswerRe: detect javascript code for google ad sense Pin
benjymous29-Sep-09 21:50
benjymous29-Sep-09 21:50 
GeneralRe: detect javascript code for google ad sense Pin
Anil Veeraghattapu 429-Sep-09 22:55
Anil Veeraghattapu 429-Sep-09 22:55 
GeneralRe: detect javascript code for google ad sense Pin
benjymous30-Sep-09 1:04
benjymous30-Sep-09 1:04 
QuestionHow to define an inline array of a contstant size in a C# structure Pin
maheesh29-Sep-09 21:13
maheesh29-Sep-09 21:13 
Hi,

How to define an inline array size inside the stucture.Sample code i'm attaching the code block.
I'm using MarshalAs unmanaged it's working fine.
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public struct tPacket {    
/// WORD->unsigned short    
public ushort word1;    
/// WORD->unsigned short    
public ushort word2;    
/// BYTE->unsigned char    
public byte byte1;   
 /// BYTE->unsigned char   
 public byte byte2;    
/// BYTE[8]    [
System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst=8, ArraySubType=System.Runtime.InteropServices.UnmanagedType.I1)]   
 public byte[] array123;}

And i used a struct which has a create method that fills out the array but it thow an error
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public struct tPacket {    
public ushort word1;    
public ushort word2;    
public byte byte1;    
public byte byte2;    
public byte[] array123;   
public static tPacket Create() {       
  return new tPacket() { array123 = new byte[8] };    }}


please help me.
With Regards
Mahesh
AnswerRe: How to define an inline array of a contstant size in a C# structure Pin
Luc Pattyn30-Sep-09 0:45
sitebuilderLuc Pattyn30-Sep-09 0:45 
GeneralRe: How to define an inline array of a contstant size in a C# structure Pin
maheesh30-Sep-09 2:42
maheesh30-Sep-09 2:42 
GeneralRe: How to define an inline array of a contstant size in a C# structure Pin
Luc Pattyn30-Sep-09 2:56
sitebuilderLuc Pattyn30-Sep-09 2:56 

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.