TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rodney Johnson
NA
80
0
dynamic public array
May 27 2010 11:52 PM
I would like to declare a public array to be used across my solution.
namespace SolutionName
{
internal class Input
{
public int arraySize = Convert.ToInt16(ConfigurationManager.AppSettings.Get(("size")));
public in[] array = new double[arraySize , 1];
}
}
I get the following error:
A field initializer cannot reference the non-static field, method, or property 'SolutionName.Input.arraySize'
My goal is to allow the user to dictate the size of "array" via the web config file. Any suggestions?
Reply
Answers (
6
)
C# XML Help!
How To Make Peramid In C#