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
Rich
NA
84
61.1k
Objects/Instances in static classes
Mar 13 2012 5:41 AM
I know that you can't instantiate a static class, and all of its members and methods should be static, but I am a little unclear about the use of of other objects within a static class. Is it legal to make an instance of another class within a static class. example:
static class car()
{
radio mp3Player = new radio();
static int SongID()
{
int id = mp3Player.getFirstSongId();
return id;
}
}
Reply
Answers (
2
)
How to print only Date and Time (not seconds) in C#
Difference between stored Procedure and Function