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;
}
}
Objects/Instances in static classes
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Mar 13, 2012, 1:46 AM EDT
Rich83 reputationPosted Mar 13, 2012, 1:56 AM EDT