You could simply do the following: public string[] LabValues { get { return m_labValues; } set { m_labValues = value; } } } This will work but is not considdered good coding. You should rather use a generic list or a public method to set the array. public void SetLabValues(string[] ar) { m_labValues=ar; }
andre_swnpl
Posts
-
How to use arrays as properties of a class? -
Problem with operating system.justintimberlake wrote:
I have the service interact with desktop
This is probably why. Interacting with the desktop requires a user to be logged on. With XP this is not a problem as xp also requires a user for most operations, whereas windows server 2003 do not. Hope this helps you a bit.
-
Preventing multiple instances of the windowMDI Parent forms contain a collection of it's children (this.MdiChildren). Before you open a new instance of a form you could check this collection if your form exist and simply activate this instance.
-
[UPDATE] An XP Installation QuestionI once had the same problem where my windows installation (on a new machine) just did not want to get past 53-55% no matter what I tried. It turned out that one of the ports on the CPU was blown - probably during installation. Now I do not know how this can cause the installation to get up to a certain point and then hang (or how the machine actually managed to switch on for that matter) but for me replacing the CPU colved the problem. This is just an idea. :-D
-
Passing Objects to threads..you could do this: create a class that will execute on the thread. public class ThreadObj { private int t1; private string t2; public int T1 { get { return t1; } set { t1 = value; } } public string T2 { get { return t2; } set { t2 = value; } } public void MyThreadMethod() { string t = t2; } } then call this with : ThreadObj o = new ThreadObj(); o.T2 = "Hello"; o.T1 = 1; System.Threading.ThreadStart ts = new System.Threading.ThreadStart(o.MyThreadMethod); System.Threading.Thread tr = new System.Threading.Thread(ts); tr.Start();
-
how can i make exe in vb.netSet the project output type to Windows Application or Console Application and press compile.
-
Encrypting the passwordMark Greenwood wrote:
we use it in my company (note I'm not saying WHICH company)
:laugh::laugh: Most companies use this I suspect - as it is very easy to use and very strong. Usually with a strong password as well.
-
I got to get this off my chest....I agree. It is sad when this happens but unfortunately this is also "textbook" as the saying goes. I have seen this a couple of times and once even where I used to work. The VP or CIO or someone leaves and the company gets someone to "ruffle the feathers" as they say. This gets a lot of the people that work there upset and they will then leave. This is usually the highest paid members. This will cause the salaries paid to be less and therefore the company's profit goes up and this means the stock prices go up. This is very nasty - but it happens. My advice would be to just "ride it out" things should settle down eventually.
-
Loged in user Information?You can't realy. The best you can do is to call HttpRequest.LogonUserIdentity.
-
Lazy Database AccessDo the search on the SQL server with a stored procedure and create appropriate indexes.
-
Pdf editor??The best one will have to be Adobe Acrobat. ;P
-
Need to implement AI in TicTacToeAgreed! Not very elegant but certainly viable.
-
Need to implement AI in TicTacToeI dont think you will need much in the line of AI. you could simply calculate all available moves and assign a weight to each move and choose the best one. You could even use some kind of probability to "see ahead" to try to guess what the opponents best moves may be given a certain move.
-
VMWare Question about Mac...Frank Kerrigan wrote:
That must be why you can't port any music from Ipod to a standard MP3 player.
Actually you can. If you set the default File format for iTunes to mp3 (You do this via Options i think) and then select all files and select convert to mp3. beware this will create a duplicate file in mp3 format.
-
Partial declaration error in C#.C#Coudou wrote:
public static void Main()
I means that you have more than one of these.
-
Microsoft SurfaceIt probably will I think. It seems to me that Microsoft is desperate. Their products are very good but they haven't brought anything new to the table in the last couple of years. Even Vista is not realy new is is the same thing with just a new look (and a huge resource hog).
-
RFPHow about using a GUID. That is easy to forget for anybody. :laugh:
-
Run Stored Procedure on MS SQL 2005You should put a try-catch block over the code and catch the SqlException specifically - then you can check the inner-exception. that will tell you what is going wrong.
-
Hey folks, that's funny...It would indeed seem that way. If I do the following in c++ I do get the expected result int a; int b; a = 5; b = ++a; b += ++a;
-
Hey folks, that's funny...You are correct and this is what i got with c# as well, but c++ gave me 14.