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
strandberg
NA
5
0
Naming objects
Oct 26 2006 7:58 AM
Is there any way of naming a object from a variable? I know in PHP this is easely done since variables has a $ infront of them.
Using PHP Variables in C# (if this was possible):
$varName = "myBook"; Book $varName = new Book()
It will be named what the variable $varName contains.
Using C#:
string varName = "myBook"; Book varName = new Book();
This will produce an error saying you cant convert varName from string to Book since its allready defined.
So what am I looking for? A way to name Objects from Variables. The objects NAME (Book NAME = new Book();) should be named what the variable contains!
Thx for any help or information.
Reply
Answers (
3
)
Windows login page
Capturing Windows Message