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
Jason Anderson
NA
7
45.4k
How to use class as a data type?
May 9 2011 5:00 PM
I have a user-defined data type "ClassA". I get an error when trying to set value of Attribute1.Attribute2.
public class Class1
{
public struct structA
{
private int value1;
public ClassA Attribute1
{
get{return value1;}
set{value1=value;}
}
}
public ClassA
{
private int value2;
public int Attribute2
{
get{return value2;}
set{value2=value;}
}
}
public ClassB
{
public void GetData()
{
...
...
structA.Attribute1.Attribute2 = 10;
...
...
}
}
}
I get an <undefined value> everytime I try to get or set Attribute1.Attribute2....Any ideas?
Thanks in advance.
Jason
Reply
Answers (
1
)
Error in multi threading
C# Replication