Answer Questions
deepshikha Number lines
Hiya! Hi in a programming book I am reading VS shows every line numbered on the left side of the IDE. How do I this example 1 namespace 2 3 Thanks You rock man, thanks! Tools->Options->TextEditor(on the left side->All Languages->check the "line numbers" ...Show All
Eugene Dorofeyev Mutex.Dispose() - Does it release the mutex?
Does anyone know if disposing a System.Threading.Mutex object will call ReleaseMutex() for the object automatically. I'm assuming not, but I can't find anything explicit in the documentation. Does anyone know Ah good! Thanks. As far as i can see in the reflector, it should close. But wait, is call's the close method of the WaitHandleProtector class. Meybe that is different, ...Show All
rEgEn Serilization of a generic List of a custom type, how?
Well, hi all. This is my first post here, since I haven't been able to find the required information anywhere else, so I will give it a go here... I am trying to make a generic list of a custom type and serializing it. Sounds simple but apparently its not. I have now boiled the problem down to a very simple example, and tried to get consistency in the problem. The problem occur every time the assembly holding the custom type is rebuild. Natu ...Show All
stic How to store a TreeView state and restore it back
hi everyone, My code looks like this dataentryTreeView.Dispose() ; // disposes off the old tree InitializedataentryTreeView(); // again rebuilds the tree with the updated information return true ; Everytime i add,update or delete a node from my treeview it disposes the old tree view and rebuilds a new tree with updated information but the problem i am loosing the previous state of the tree view so it's becoming hard to nav ...Show All
Toddap_MS invalid cast
This piece of code works fine and needs no explicit cast in vb.net. itemId = arrCart(cartId, i) When I converted it to C#, however, it complained that it cannot do the implicit conversion. So I tried: itemId = (int)arrCart[cartId, i]; But I get an exception error read: Specified cast is not valid. itemId is an integer and arrCart is a two dimensional array object: int itemtId; object[,] arrCart; Can anyone tell me how to correct this ...Show All
Charles Aimer Binary Data & .Net Sockets, URGENT
Hello every one, After 2 hard week of work, finally i accomplished an reliable server and client classes which look like the VB Winsock, those 2 classes are reliable, also server enable multiple connections, as i test it accept 5000 connection and Handel them, The base is MSDN & good socket samples. When i try to create an demo app. on these 2 powerful classes, all goes fine, i faced an problem in sending files, as I'm using one channel only ...Show All
Ralph Gasser caret of the richtextbox
Hi, I am working on an editor using richtextbox. When the background color is set to a color close to the mid-tone (i.e. close to 128,128,128), the caret becomes very vague and difficult to locate. I found some material on the internet about changing the appearance of the caret using CreateCaret. But that does not seem to work with the richtextbox. Is there a way to customize the caret color or the caret width of the richtext ...Show All
MubasherAbad how to check the node's text, level and depth in a treeview control?
For example, if I have a parent node Root and then child node Child created at design-time, I know how to add child nodes to Child at run-time but my problem is adding grandchild nodes to Child. Root Child ChildOfChild1 // created at run-time ChildOfChild2 // created at run-time How can I add child nodes to ChildOfChild1 or to ChildOfChild2 at run-time the children of Child are sorted randomly so their indices change. ...Show All
fcjam How do I insert this Statement using CodeDOM
Hai....., I would like to define the CodeConditionStatement as follows using CodeDOM. if (disposed == false ) How do i do this Never mind I got it It's like CodeConditionStatement condStt = new CodeConditionStatement ( new CodeBinaryOperatorExpression ( new CodeVariableReferenceExpression ( "dispose ...Show All
suncream help me -- sound project --
hi i want to record sound and save it as wav file A full working example with article can be found here: Dictation Recorder with PlayBack Program using C# . please , i want an start point to record voices that come out from speakers; You can take a look at the DirectSounds API, a great article is: A full-duplex audio player in C# using the waveIn/waveOut APIs . ...Show All
Mark Boehlen Collection was modified; enumeration operation may not execute.
I create method feedingtime(), all animals eat in order of birds, snake and then monkeys. If an animal does not have enough food then report that it. . . escaped. public void Feedtime() { IEnumerator em = animalList.GetEnumerator(); while(em.MoveNext()) { if(em.Current.GetType()==typeof(Bird)) { iFoodPresent -= ((Bird)em.Current).getFoodIntake(); if (iFoodPresent>0) { Console.WriteLine(((Bird)em.Current).ToString()+ &quo ...Show All
JayatMed To choose between C# and VB
I wish to start learning either C# or VB Express Editions. The aim is to write applications to communicate with 'homebrew' hardware on the serial port,or better still, USB. The communication requirements are modest - several different trigger signals to the hardware, read pushbuttons on the hardware, or collect slow speed data. I would appreciate advice on the trade-off between the learning curves for C# and VB versus their communication capa ...Show All
zhengjs Why to use Interface IDbConnection,IDbDataAdapter .Its real time use????
Hi, I could not understand real use of this syntax IDbConnection myConn = new SqlConnection(); IDbConnection myConn = new OleDbConnection(); IDbConnection myConn = new OdbcConnection(); We can also use for SqlConnection System.Data.SqlClient's SqlConnection class . Then why to use Interfaces.... Please give architectural benefit....any example will be more help full. regards ashok Hi ...Show All
Nathan Phelps DateTime SQL Statement Problem
Hi, I am using these SQL statements to extract data from MS SQL 2005 Express but I am not getting any records maybe because the appointment_start field is datetime field. I tried Date(appointment_start) but i got Syntax error. "select * from appointments where appointment_start between '" + DateTime.Now.ToShortDateString() + "' and '" + DateTime.Now.ToShortDateString() + "' order by appointment_start, a ...Show All
Erick Thompson - MSFT menu items calling forms
I've been trying to find information on how to call forms from menu items. The help system isn't helpfull. Can someone point me to some helpful information including sample code Thakyou, Here's the basics: Assume you have added a form to your project named "frmMenuItem" You can double-click on the menu item you want to call this form to create the event function. In the function you wo ...Show All
