Click here to Skip to main content
15,923,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
public student()
{
public List<student_details>studentdetails=new List<student_details>();
public student()//constructor
{
Student_details s=new Student_details();
{
s.Student_Name=//here i have access the value from Student_details class
}
}
}
public Student_details()
{
public string Student_Name{get;set;}
//I am getting a value of student name from  xml using another c# file
}
Posted
Updated 19-Jan-14 19:33pm
v2
Comments
Gitanjali Singh 20-Jan-14 1:34am    
Your question is not clear.
Karthik_Mahalingam 20-Jan-14 1:48am    
you mean to access the value from the list ?
Rahul VB 20-Jan-14 12:57pm    
Do you want to get the value from the property: Student_Name and put it into a list?
Member 10500446 20-Jan-14 22:01pm    
Thank you for your considerate reply...the get and set function will get the name of the student... I have to pass that name to s.Student_Name.

Refer:
http://www.dotnetperls.com/list[^]

This may help.
 
Share this answer
 
Hi.. Use code like this...

C#
Student_details s=new Student_details()
{
 Student_Name = "abcd"
};
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900