Click here to Skip to main content
15,890,825 members
Home / Discussions / C#
   

C#

 
GeneralRe: Streaming images using TCP help Pin
Luc Pattyn27-May-10 2:59
sitebuilderLuc Pattyn27-May-10 2:59 
QuestionNew Bluetooth Profile Pin
ika226-May-10 3:03
ika226-May-10 3:03 
QuestionWorking with list(Please help) [modified] Pin
future383926-May-10 2:36
future383926-May-10 2:36 
AnswerRe: Working with list(Please help) Pin
Henry Minute26-May-10 2:40
Henry Minute26-May-10 2:40 
GeneralMessage Removed Pin
26-May-10 2:46
future383926-May-10 2:46 
GeneralRe: Working with list(Please help) Pin
Henry Minute26-May-10 2:50
Henry Minute26-May-10 2:50 
GeneralRe: Working with list(Please help) Pin
future383926-May-10 3:04
future383926-May-10 3:04 
AnswerRe: Working with list(Please help) Pin
Henry Minute26-May-10 3:36
Henry Minute26-May-10 3:36 
OK. That is much better.

In your ReadStudentFile(string Fr_Name, string Sr_Name, string St_Id, int Lb_Mark, int Ass1, int Ass2, int Fnl), what are the parameters (Fr_Name, Sr_Name etc.) supposed to be for? You are not using them to pass data in and they are not configured to return data and even if they were they would only return the last student in the list.

Unless I have totally misread your code ReadStudentFile would be better as something like:
public List<ITECH3219Student> ReadStudentFile(string Fr_Name, string Sr_Name, string St_Id, int Lb_Mark, int Ass1, int Ass2, int Fnl)
{
      FileStream flstream = new FileStream("c:\\student.dat",FileMode.Open,FileAccess.Read);
      BinaryFormatter BnFrmt = new BinaryFormatter();
      List<ITECH3219Student> list = (List<ITECH3219Student>)BnFrmt.Deserialize(flstream);
      return list;
}


Your Assignment2.BLL would also need to be rewritten to return the List<ITECH3219Student>, once again no obvious need for the parameters.
and then in your Form1_Shown something like

private void Form1_Shown(object sender, EventArgs e)
{
    Assignmnet2.BLL.Finalization ReadStudent = new Assignmnet2.BLL.Finalization();
    List<ITECH3219Student> studentList = ReadStudent.read();
    foreach (ITECH3219Student student in studentList)
    {
      LstBox.Items.Add(student.Fr_name + " " + student.Sr_Name + " " + student.St_Id));
    }
}


This should work, although I have to say that the slightly 'artificial' way that you have divided the functionality between the various classes indicates that you have not really understood the assignment.

Good luck! Smile | :)
Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas?
Because 31 Oct = 25 Dec.

GeneralRe: Working with list(Please help) Pin
Alaric_26-May-10 4:02
professionalAlaric_26-May-10 4:02 
GeneralRe: Working with list(Please help) Pin
Henry Minute26-May-10 4:08
Henry Minute26-May-10 4:08 
GeneralRe: Working with list(Please help) Pin
future383926-May-10 4:17
future383926-May-10 4:17 
GeneralRe: Working with list(Please help) Pin
Henry Minute26-May-10 4:24
Henry Minute26-May-10 4:24 
GeneralRe: Working with list(Please help) Pin
future383926-May-10 18:20
future383926-May-10 18:20 
Questionreplace Winlogon Pin
einsteinmow26-May-10 1:35
einsteinmow26-May-10 1:35 
AnswerRe: replace Winlogon PinPopular
Simon P Stevens26-May-10 1:58
Simon P Stevens26-May-10 1:58 
AnswerRe: replace Winlogon Pin
Richard MacCutchan26-May-10 1:59
mveRichard MacCutchan26-May-10 1:59 
AnswerRe: replace Winlogon Pin
Dave Kreskowiak26-May-10 2:04
mveDave Kreskowiak26-May-10 2:04 
Questionread file Pin
tek 200926-May-10 1:17
tek 200926-May-10 1:17 
AnswerRe: read file Pin
Richard MacCutchan26-May-10 1:54
mveRichard MacCutchan26-May-10 1:54 
GeneralRe: read file Pin
tek 200926-May-10 2:45
tek 200926-May-10 2:45 
GeneralRe: read file Pin
Richard MacCutchan26-May-10 4:22
mveRichard MacCutchan26-May-10 4:22 
GeneralRe: read file Pin
tek 200926-May-10 4:28
tek 200926-May-10 4:28 
GeneralRe: read file Pin
Richard MacCutchan26-May-10 6:33
mveRichard MacCutchan26-May-10 6:33 
QuestionDatagridview moves to first column when selecting row(s) Pin
andrehoyer26-May-10 0:54
andrehoyer26-May-10 0:54 
AnswerRe: Datagridview moves to first column when selecting row(s) Pin
Peace ON27-May-10 0:09
Peace ON27-May-10 0:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.