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
meetaligoel
NA
10
0
Method that creates array of objects passed to it?
Nov 29 2003 1:58 PM
Hello, This may seem a pathetically simple question to some of you and I'm sure I'm just not seeing the forest for the trees. class xyz { private object[] array; public xyz(object parameter, int size) { array = new object[size]; foreach(int i = 0; i< size; i++) { array[i] = new typeof(parameter)(3,4); .... This is somewhat pseudo code but I guess you see what I mean. The array should be able to hold any type but I need to then fill it with new instances of whatever I pass to that function. This could be simple ints, but may also be classes where I'd have to pass parameters (here 3,4) to the constructor. Am I thinking to complicated? Many thanks, N.
Reply
Answers (
1
)
C# with Oracle
Remoting related