Answer Questions
Jon Braganza Problem: The breakpoint will not currently be hit. No symbols have been loaded for this document
Hi, I've run into a problem that seems to defy a solution. Bottom line: When I'm attempting to debug with VS 2005, I cannot set an effective breakpoint in one of the source files. The breakpoint is the hollowed-out reddish/yellow circle, and VS says that the breakpoint won't work because the symbols are not loaded. I've found several discussions in this forum about this type of problem, but there's no concensus that I could find on how to solve the problem. Some background might be in order. I have been developing a "data binder" for use in a forms UI application that has multiple threads. There are three projects/classes in the solution, one for a test mainline, using forms, one for a general-purpose "dump" routi ...Show All
ron nash How to access a generic method argument in the following example:
The calling code looks as follow: Session[KeyName] I need to know the value of the KeyName inside the Session property below. private static Dictionary < string , object > m_Session = new Dictionary < string , object >(); public static Dictionary < string , object > Session { get { //need to check here whether a requested dictionary KeyName //exists before attempting to return its value. return ...Show All
J. Ho csc.exe can anyone make any sense of it?
I was reading up on compiling using csc instead of the in program compiler. I was basically curious. but when I opened my command prompt, it claimed that csc does not exist. so after searching my computer for it, i found it. I realised that to use it, I need to navigate to the folder in the command prompt which takes time. then i realised that in order to use it, i would have to use the command along with the full path to my cs file. which of course is not possible when there are spaces in the names of the folders. so in the long run, I have found this utility to be useless. either that or my experience with command prompt is lacking. anyone else have any views on this ah! thanks for that! that ...Show All
xavier_X To _, or not to _?
The .NET Framework is littered with private variables preceeded with the _ (underscore) character. Is this good practice Or something Microsoft are trying to stamp out its not about best practice but rather naming conventioning/schemes. there was a doc about this... http://msdn2.microsoft.com/en-us/library/ms229045.aspx I can't remember if it covers this stuff but take a look, hope you find it useful in some way again its personal preference. At the end of the day variable names doesnt matter, its only for us humans. private string theTitle = "Handle it!"; I do personally use the "_" prefix for private fields, so I don't need to clarify private field u ...Show All
Tryst Application not responding
Hi, Is there a way to the application do not show the status (Not responding) in windows Xp for example, when it's running a big operation I tried removing the "Causesvalidation" but didn't worked ! I'm using this.refresh() sometimes, and does not work as well. Thanks If you have a process that is running that long, for the sake of the user experience you might want to look at tossing it over to a thread to help improve the User experience even more. In C#: Application.DoEvents(); I got the following errors Visual Studio Projects\Leitor\Form1.cs(208): Only assignment, call, increment, decrement, and new object expressions can be used as a statement and Visual ...Show All
pharaonix Drawing and Refresh()
Hey I have problem with function OnPaint: ex. int x = 100; protected override void OnPaint(PaintEventArgs e) { Graphics gfx = e.Graphics; Pen myPen = new Pen(Color.SandyBrown,5); gfx.DrawLine(myPen, x, 180, 200, 200); } I would like to still have got line when value of x = 100 after changing it to 200 and calling Refresh(); How to do that thanks Don't call Refresh() Call Invalidate(true) I'm not sure if wizkid's solution will work, but I would use a list in this case. Probably a list of a custom Line class. However, if you really only need x to change, try having something like this (I've actually only used .NET 1.1, so the list code may be wro ...Show All
Will Merydith Process class used from Windows Service fails
I'm having trouble with the Process class. I have a Windows Service running as SYSTEM and I want it to spawn processes on behalf of users. I get the user's password there securely and create a SecureString. I get a Win32Exception "Access Denied" on Process.Start. If I run the service under the same account as the user I want to start for, I still get the exception except it says "The handle is invalid". I've checked and checked the SecureString and I've made it read-only so I don't think that's it. I actually had gotten it to work some time ago if I impersonate the client but this isn't really practical since the job can be queued up waiting for some time. I've signed all the assemblies involved and I've given the ...Show All
WRBehning How can we read the properties of song selected from the fileupload control
Hi, i will upload one song from fileupload control at this time i would like to read the advanced properties of selected song, advanced properties like Album, Author, Title, Duration etc., of the selected song. How to do this Thanks Vishwanath Hi, Where do you get the class definitions for ID3V1Tag and WMAID3T Greetz, Geert Geert Verhoeven Consultant @ Ausy Belgium My Personal Blog hi vishwanatha, u may try this: Dim id As ID3V1Tag // this for mp3 //Dim w as WMAID3Tag // this for wma //w = New WMAID3Tag(tbFilename.Text) id = New ID3V1Tag(tbFilename.Text) tbTitle.Text = id.title tbArtist.Text = id.artist tbAlbum.Text = id.album tbGenre.Text = id.genre ...Show All
qkhader Breakpoints, C# IDE Express Edition
How do I reset all breakpoints I am using VS C# 2005 Express Regards, Saleem Yusuf In the full version there is an option under the Debug menu item. If there's not one there, then you don't have that option. OK, like I said, if it's not there, it's not there. You can also right click on an existing breakpoint in the full IDE and get a menu that way, if that doesn't work, then that's an example of something removed from the free versions, which are, after all, free. Thanks for the response. I couldn't find it. In VC++ 6.0 IDE, there is a menu item "Breakpoints..." (Alt-F9) under Edit menu. It allows you to put conditional breakpoints and also allows you to remove a ...Show All
Henrik Dahl Performance Optimization of C# Application
hi Is there any guide or documentation available that help me understand various factors that can optimize my application with respect to performance . What steps should i take or what factors should i consider in order to cater the performance issue while coding .How attribute and code analysis feature can really help Any idea , guideline will be highly appreciated .... Thanks Tabish. Hi, About performance issues, read the article from the previous post that is very good. About real time applications, we have design a real time auction engine with 23 servers interacting with each other and it works great. Remember that because is precompiled code the first execution of every function the CLR compiles your precompiled code in ...Show All
NeederOfVBHelp convert from vb to c#
Hi all, I had the vb code as follow: objdata.Tables( "record" ).Rows(v1).Item( "name" )=txt1.Text Can someone help me to convert this to C# code I had tried this objdata.Tables["record"].Rows[v1 ].Item[ "name" ]=txt1.Text; but was given an error Error 4 'System.Data.DataRow' does not contain a definition for 'Item' Thanks Hi, Thanks for your answer. Hi bslim I think we can use C# code as follow objdata.Tables["record"].Rows[v1 ][ "name" ]=txt1.Text; please have a try Hi, bslim In C#, there is no DataRowCollection[int num].Item expression, you'd use ItemArray (ob ...Show All
JohnPatchin Implementing an expression parser
Hi All, First of all thanks you very much for spending your time to open this post. We are trying to implement a small parser which evaluates expression given by users. We have idenfied a set of operators, functions, keywords, conditional staments which are required for the language. Can you please tell us how shall we implement a parser which checks syntax of the expression and evalutes them If you have any reference to data structure concepts, please let me know. Many thanks in advance. Cheers, Gopi Sounds like you're trying to build an interpreter. If you're new to the subject, read some articles on languages and grammars. It's not an easy subject. First you'll have to build a tokeni ...Show All
ssfftt "Inconsistent Accessibility" when sharing Generic List
Hi, I have some code that gives me the following error: Error 1 Inconsistent accessibility: field type 'System.Collections.Generic.List' is less accessible than field 'PREPA_DAS_2007.frmDashboard.InstrumentList' C:\Documents and Settings\r-rivera\My Documents\PREPA DAS 2007\PREPA DAS 2007\Dashboard.cs 32 34 PREPA DAS 2007 I have two forms. The first one: public class Form1 : Form { public List<MyClass> MyClassList; } which I can instatiate like so: Form1 SomeForm = new Form1(); Defining this List as Public gives me the error. However I want to access this list from another form at runtime, say, with the following line of code: public class Form2 : Form { public void SomeFunction() ...Show All
Muhammad Azeem Azam changing mouse icon system-wide
am making a project that changes the mouse icon on click event made the hook to capter leftmousedown but i don't know how to make it system wide aka so on every winform the click event changes the icon to somthing defrent can anybody point me to the rigth direction please (any site. article, anything) thanks ...Show All
MJian Help in Execute Scalar
hi i creating a form in VS 2005. I want to have this error at execute scalar(). Invalid casting. Can someone please help SqlConnection conn = new SqlConnection ( this .ConnectionString); try { conn.Open(); SqlCommand cmd = new SqlCommand ( "Select sum(qty) from Inventory where prodNo = @prodNo AND qty <> @qty" , conn); cmd.Parameters.Add( "@prodNo" , SqlDbType .VarChar); cmd.Parameters[ "@prodNo" ].Value = prodNo; cmd.Parameters.Add( "@qty" , SqlDbType .Int); cmd.Parameters[ "@qty" ].Value = 0; int qty = 0; qty = (int )cmd.ExecuteScalar(); return qty; } finally { conn.Close(); } ...Show All
