Answer Questions
Jason1 Bugs in .NET 2.0 ?
Hi There Either I'm making an error or there are two bugs I have found in .NET 2.0 Beta .... private void button2_Click( object sender, EventArgs e) { toolStripStatusLabel1.Text = "Asterisk" ; toolStripProgressBar1.Value = 33; System.Media. SystemSounds .Asterisk.Play(); System.Threading. Thread .Sleep(750); toolStripStatusLabel1.Text = "Beep" ; toolStripProgressBar1.Value = 66; System.Media. SystemSounds .Beep.Play(); Sys ...Show All
arazy abstract/virtual events
If you have an abstract base class which has an event that children may implement, and none of the base class methods connect or raise the event, then what's the difference between declaring that event as either abstract or virtual I can't find much of anything in the docs about abstract or virtual events. A virtual event, just like a non-virtual event does have implementation. For example, if you do ...Show All
SillaS Bitwise operations on a thread's ThreadState
Hello! I'm just playing some with threads and now I want the possibility to pause and resume a thread. I've got a button that when clicked should check if the thread is running and then do myThread.Suspend(); and if not do myThread.Resume(); How should I do that Thanks in advance! Note that Thread.Suspend and Thread.Resume have been marked as obsolete. You should use manual thread synchronization to p ...Show All
Hallelujah using Arrays with unknown size
Hi, I need to know how can I using an array or arrayList if I don't know the number of elements in advance If I can't , is there an alternative way Thanks, Aya. For ArrayList you don't need to know the size in advance. Just create an ArrayList and add items to it: ArrayList list = new ArrayList(); list.Add("Hello"); list.Add("World"); list.Add("!" ...Show All
jnc Exe path from file extension
Any way in the framework to get the .exe file path from a particular extension TIA Since you’ve already found how to find the name of the handler for the given file type, you next would need to locate that handler, also within HKEY_CLASSES_ROOT where for the .sln file you have found the name to be VisualStudio.Launcher.sln, you should see a key by the name of Shell, which itself contains an Open key whi ...Show All
MarkGut Data binding hell
Something so easy causing so many greys.... void fetchNames() { comboBox1.Items.Clear(); OracleDataAdapter dAdapter = new OracleDataAdapter("select name from people order by id",myOracleConnection); &nb ...Show All
Preston Bostrom Declarative Security Puzzling
Hi! I am trying to use declarative security from Visual Studio 2005 (see bottom). I am getting a Security Exception Unhandled error. First of all, since I am logged in as an Adminstrator, I don't understand why I am getting the exception at all. Second, since I have the try-catch, I--again--don't understand why I am getting the exception. [PrincipalPermissionAttribute ( SecurityAction.Demand, Role = "Administrators" )] ...Show All
softer updating the UI with progress bar while Business Layer in process
Hi I'm developing a windows based c# application. How do I update the UI with progress bar while Business Layer in process where my BL is in a seprate Machine in the same network. I tried by placing a thread to update the progress bar and at the same time BL function will also execute. But this doesn't seems to be working properly. can any one sugest any methodolgies for this Regards Karthik Uhmm, it "didn't ...Show All
Yasser Dispose() and null
If I call the "Dispose" method on an object, would it be equal to null And If I make the object equal to null instead, would it be same as calling "Dispose" method of the object For example: SomeObject obj1 = SomeObject(); SomeObject obj2 = SomeObject(); obj1.Dispose(); obj2 = null ; Console.WriteLine(obj1 == obj2); What would be the result of executing the above statements (suppose SomeObject only inhreits the default Dispose me ...Show All
Sung M Kim .net 2.0 problems
Whenever I try to use anything from the 2.0 framework I get an error in VS2005. If I have "using System.Windows.Forms.VisualStyles;" The compiler tells me "VisualStyles" is not part of the System.Windows.Forms namespace. I've tried reinstalling VS2005 and .net 2.0, but no luck on either case. Things like AutoScaleMode don't work either. Anything pre-2.0 seems to be working fine. I'm just wondering if there is some weird way t ...Show All
happy_84k Casting an enumeration that has a defined type..
public enum foo : ushort { foo, bar } ushort test = foo.bar; Cannot convert from 'Test.foo' to 'ushort' Sure, I can make variable of type foo, but I'm encoding the value to a network stream, so I want it as a ushort. The thing is, I specifically told the compiler the enum is of type ushort, so why do I have to typecast it Right. The underlying type specification for the enum only specifies the inter ...Show All
lxhvc bat-file startup + options
Hey, I have a bat file containing this: EP-Intro.exe -C:\Documents and Settings\Ruben\Mijn documenten\testen.ep Now I want to get the text behind the "-" sign in a string, I want to be able to get the option added to the exe. Is there a way to do that I thought about something like this, but it doesn't work. static void Main( string [] args) { Application .EnableVisualStyles(); Application .SetCompatibl ...Show All
Ben Griffiths Translating exceptions from C++ to .NET
Hello, Using IJW technology, I have a .NET program on top of a C++ code. A C++ exception (derived from std::exception) is thrown in the C++ part. In the managed part, I get a SEH exception, but can't find any way to get the additionnal information (the what() string, or the real type of the exception, runtime_error, bad_alloc...). Is there any way to get this information Best regards, If you just n ...Show All
mace151 What algorith does garbage collector uses,Why it is non -deteministic ????
Recently I faced an interview in which this question was asked "What algorithm garbage collector uses and why its non-deterministic " Please explain it... I understood like : what does garbage collector do So it manage memory system. for example u have to dispose your objects on runtime in old languages... becouse if u dont dispose.. memory will be full .. so Developer's mistake can stop your computer.. Garb ...Show All
CJ60610 Automatically install and start service
All the help stuff I have read, mentions using the command line InstallUtil.exe to do a service installation, followed by a manual start. Is it possible to have the service exe itself do the install and start-up to make distribution and handling a bit easier for non-techies (after all, users are used to just double clicking an exe file to have an app run, and it would be good to have the same functionality with a service.) Hi Craig ...Show All
