Click here to Skip to main content
15,793,452 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:

I want to convert code from delphi to C#
i want to fill the structure object with ' ' i.e 32 in C#

FillChar(mystructobj,sizeof(mystruct),' ') ;

1 solution

string s = new string(' ', 20);

Good luck!
Share this answer
Member 4354249 5-Jun-12 3:07am    
but what i have is a structure object. i want all the fields of structure object to be assigned with (' ') char
E.F. Nijboer 8-Jun-12 17:20pm    
This normally isn't possible, but check the links if you want to dive in:

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900