Click here to Skip to main content
15,891,717 members
Home / Discussions / C#
   

C#

 
GeneralRe: own Printer service on c#.net Pin
vikas amin1-Aug-08 6:15
vikas amin1-Aug-08 6:15 
GeneralRe: own Printer service on c#.net Pin
vikas amin19-Aug-08 5:41
vikas amin19-Aug-08 5:41 
QuestionArrayList ....Where is problem? Pin
zeeShan anSari30-Jul-08 6:30
zeeShan anSari30-Jul-08 6:30 
AnswerRe: ArrayList ....Where is problem? Pin
Wendelius30-Jul-08 6:44
mentorWendelius30-Jul-08 6:44 
GeneralRe: ArrayList ....Where is problem? Pin
zeeShan anSari30-Jul-08 6:52
zeeShan anSari30-Jul-08 6:52 
QuestionRe: ArrayList ....Where is problem? Pin
Wendelius30-Jul-08 6:54
mentorWendelius30-Jul-08 6:54 
AnswerRe: ArrayList ....Where is problem? Pin
zeeShan anSari30-Jul-08 7:09
zeeShan anSari30-Jul-08 7:09 
GeneralRe: ArrayList ....Where is problem? Pin
Wendelius30-Jul-08 7:22
mentorWendelius30-Jul-08 7:22 
Yes, the problem is in Dept class. Don't use static keyword on the fields containing the data since there is only one copy of the data.

Also it would make sense to protect the fields since you have public properties for setting and getting the field value.
class Dept { 
      private static string Deptno;
      private static string Dname;
      private static string Loc; 
      public string DNAME { 
         get { return Dname; } 
         set { Dname = value; } 
      } 
      public string DEPTNO { 
         get { return Deptno; } 
         set { Deptno = value; } 
      } 
      public string LOC { 
         get { return Loc; } 
         set { Loc = value; } 
      } 
   }

Hope this helps,

Mika
GeneralRe: ArrayList ....Where is problem? Pin
Alaric_30-Jul-08 7:31
professionalAlaric_30-Jul-08 7:31 
GeneralRe: ArrayList ....Where is problem? Pin
zeeShan anSari30-Jul-08 7:47
zeeShan anSari30-Jul-08 7:47 
GeneralRe: ArrayList ....Where is problem? Pin
Wendelius30-Jul-08 7:58
mentorWendelius30-Jul-08 7:58 
QuestionInvisible Form Labels [modified] Pin
#realJSOP30-Jul-08 6:12
mve#realJSOP30-Jul-08 6:12 
QuestionRe: Invisible Form Labels Pin
Wendelius30-Jul-08 7:07
mentorWendelius30-Jul-08 7:07 
AnswerRe: Invisible Form Labels Pin
#realJSOP30-Jul-08 7:28
mve#realJSOP30-Jul-08 7:28 
GeneralRe: Invisible Form Labels [modified] Pin
Wendelius30-Jul-08 7:39
mentorWendelius30-Jul-08 7:39 
GeneralRe: Invisible Form Labels Pin
#realJSOP30-Jul-08 7:47
mve#realJSOP30-Jul-08 7:47 
GeneralRe: Invisible Form Labels Pin
Wendelius30-Jul-08 8:09
mentorWendelius30-Jul-08 8:09 
AnswerRe: Invisible Form Labels Pin
DaveyM6930-Jul-08 9:35
professionalDaveyM6930-Jul-08 9:35 
GeneralRe: Invisible Form Labels Pin
#realJSOP30-Jul-08 10:43
mve#realJSOP30-Jul-08 10:43 
GeneralRe: Invisible Form Labels Pin
DaveyM6930-Jul-08 11:45
professionalDaveyM6930-Jul-08 11:45 
GeneralRe: Invisible Form Labels Pin
#realJSOP30-Jul-08 12:05
mve#realJSOP30-Jul-08 12:05 
GeneralRe: Invisible Form Labels Pin
#realJSOP31-Jul-08 3:37
mve#realJSOP31-Jul-08 3:37 
QuestionHow to Update MDB file? Pin
Admin88730-Jul-08 5:20
Admin88730-Jul-08 5:20 
AnswerRe: How to Update MDB file? Pin
Yusuf30-Jul-08 5:32
Yusuf30-Jul-08 5:32 
AnswerRe: How to Update MDB file? Pin
ElSpinos30-Jul-08 5:33
ElSpinos30-Jul-08 5:33 

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.