PC Review


Reply
Thread Tools Rate Thread

Collection property not working

 
 
Hessam
Guest
Posts: n/a
 
      8th Aug 2003

From: "Hessam" <(E-Mail Removed)>
Subject: Collection property not working
Date: Friday, August 08, 2003 12:24 PM

Hello,
I am designing a .net custom control in VS.net 7.1 and my control exposes an
array of strings which are supposed to be the items to show. To do this have
declared a private string[ ] variable and a public property which returns
it.
string[] options = new string[1];

public string[] Options

{

get

{

return options;

}

set

{

options = value;

}

}

It works fine in the disigner and I can add items to the list using the
VS.net string collection editor and see the changes in real-time. But when I
run the App, I recieve this error:

Cannot create an object of type 'System.String[]' from its string
representation 'String[] Array' for the 'Options' property.

Even with other types of collections (objects, etc.), I receive this error.
What should I do.





 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill collection property from a property grid Vlado Microsoft Dot NET Framework Forms 2 29th Mar 2006 08:22 AM
Can't get collection to save when using collection of custom class as property of control in VS 2005 J.Edwards Microsoft Dot NET Compact Framework 0 10th Jan 2006 04:44 AM
Collection property not working Hessam Microsoft C# .NET 1 8th Aug 2003 10:08 AM
Collection property not working Hessam Microsoft Dot NET 0 8th Aug 2003 09:04 AM
Collection property not working Hessam Microsoft ASP .NET 0 8th Aug 2003 08:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:51 PM.