Abbas Hamza

Abbas Hamza

  • NA
  • 100
  • 52.8k

How to create a method that retrieve all student name...?

Oct 13 2013 5:10 AM
Hi all..
This my first question on this site..I have been studying c# for a year or so..
I have created a class called Student withe property: Name, age , Studentid,...
Then I have created an overloaded method as a list
Public list<Student>  GetAllStudent(string sGetStudentName_in)
{
       Student OGetStudentName = new Student();


}

Could any one give a guidance as how to complete this method and return the Name( s) only..
I omitted the connection to the database as I have retrieved the Student as an object and send the information to a DataTable as a result.
Please any help or similar example will help as I'm still trying to find my way around c# programming .
Thank you in advance

Answers (4)