473,498 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to declare DefaultValue(type, string) for an Empty Array[0]

[System.Xml.Serialization.XmlArray("MenuItems")]

[System.Xml.Serialization.XmlArrayItem("MenuItem", typeof(MenuItem))]

[DefaultValue(typeof(MenuItem[]), "new MenuItem[0]")]

public MenuItem[] MenuItems = new MenuItem[0];

I am trying to get rid of all the <MenuItem /> tags when serializing

Thanks...
Nov 16 '05 #1
0 1002

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

Similar topics

2
3056
by: Jurgen Oerlemans | last post by:
Hello, I want to change to forecolor of a label. The label is named "lblDevice1" I create a variable called Var Dim Var Var = "lblDevice1" So the next step is: Var.ForeColor =...
0
4302
by: Mike | last post by:
), "new MenuItem")] public MenuItem MenuItems = new MenuItem; I am trying to get rid of all the <MenuItem /> tags when serializing Thanks...
3
4189
by: Bram Vandendriesschen | last post by:
Hi, anyone an idea how to get DefaultValue's working for String properties in managed C++. I wrote a component in managed C++ which I plan to consume in C#. Now the IDE keeps inserting...
6
5404
by: tshad | last post by:
The error I am getting is: ******************************************************************* Exception Details: System.InvalidCastException: Cast from type 'DBNull' to type 'String' is not...
1
8259
by: Caroline | last post by:
I am trying to update a record though a stored procedure and parameters, but I keep getting this error: Additional information: Argument 'Prompt' cannot be converted to type 'String'. Any...
3
2103
by: usenet | last post by:
Kindly pardon my ignorance, but what is the way to declare a constant attribute of type string within a class? Thanks, Gus
2
2809
by: Rohn Farrington | last post by:
Hi All, Was just courious is there any performance/managebility issue while using "" or String.Empty. for example Dim str As String = String.Empty '// first Dim str As String = "" '//...
35
3623
by: Smithers | last post by:
I have been told that it is a good idea to *always* declare string variables with a default value of string.Empty - for cases where an initial value is not known... like this: string myString =...
21
2914
by: Sami | last post by:
string = "" or string = string.Empty? should is the proper way? Sami
0
1199
by: kino | last post by:
Hello, I need to declare a protected string array in my .cs file to make it accessible in the .aspx file of the same page, could anyone please let me know the syntax of declaring a protected...
0
7002
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
7205
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
6887
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...
1
4910
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
3093
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
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
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.