473,499 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Define Struct

How I define the following C struction in C#

typedef struct _T_Edit
{
char Name[256];
char EditBox[256];
} T_Edit;

the struct member is :
char [256] Name;
char [256] EditBox;
but the typedef ...
Nov 16 '05 #1
1 1596
Try this

public struct T_Edit

{

// make them public so that the can be access by outside code.

// cannot have field initializers in struct

public char []Name;

public char []EditBox;

public T_Edit(int dummy)// structs cannot have a parameterless constructor

{

Name = new char[256];

EditBox = new char[256];

}

}

Chris
"[Yosi]" <Yo**@discussions.microsoft.com> wrote in message
news:A9**********************************@microsof t.com...
How I define the following C struction in C#

typedef struct _T_Edit
{
char Name[256];
char EditBox[256];
} T_Edit;

the struct member is :
char [256] Name;
char [256] EditBox;
but the typedef ...

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4285
by: Michael Sgier | last post by:
Hello what's going on here and some basic questions: - define...unfortunately i haven't found it in my book so what exactly does this? - then SKYBOXVERTEX is declared...i understand the first...
3
10556
by: theotyflos | last post by:
Hi all, I have the following: /*--- SNIP ---*/ typedef struct Argument_s { char *address; int type;
0
1336
by: ooze | last post by:
typedef unsigned long PARAM; typedef PARAM SAP; typedef struct qnode { struct qnode *next; struct qnode *prev; } QNODE;
42
5564
by: baumann | last post by:
hi all, typedef int (*pfunc)(int , int); pfunc a_func; i know it's ok, but how can define a_func without typedef statement? thanks .
5
13452
by: Daniel Rudy | last post by:
What is the purpose of having a #define inside a struct? typedef struct { uByte bLength; uByte bDescriptorType; uWord wTotalLength; uByte bNumInterface;...
10
1477
by: Ben | last post by:
Hello, Is it possible to define a struct that has a type of itself in it? So is it possible and if so how to do what I'm trying to do here?: typedef struct mystruct { int a; mystruct *b;...
12
4610
by: djhong | last post by:
Following is a snippet of a header file. Here, #define are inside struct evConn{} Any advantage of putting them inside struct block? Looks like there is no diff in scoping of each...
4
2186
by: _mario.lat | last post by:
for struct: struct in6_addr { uint8_t s6_addr; }; is provided a costant: #define IN6ADDR_LOOPBACK_INIT {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}}} what does means {{{, and }}}?
23
3882
by: anon.asdf | last post by:
Hello! In the following code-snippet, is it possible to initialize each element of arr, with STRUCT_INIT? struct mystruct { int a; char b; };
5
3445
by: maker.rain1 | last post by:
Hello All, I have come across a problem as explained below in a sample. Please help me if anyone has any ideas to solve this. I have a #define as defined below. #define MAX 200 int...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7386
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5468
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3098
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.