2,157 Posted Topics
Re: [code]txtamount.Text = (Int32.Parse(txtprice.Text) * Int32.Parse(txtquantity.Text)).ToString(); // Integer values txtAmount.Text = (Double.Parse(txtprice.Text) * Double.Parse(txtquantity.Text)).ToString(); // Real values[/code] | |
| |
Re: Lines 76 and 77 aren't part of any method. Put them in a method. | |
Re: I don't see where you declare btn, just set some of it's values. If you need to store something related to what you want to do in the button, use the Tag attribute. | |
Re: Any way we can get a shortcut or tag for: Please enclose your code in [noparse][code] [/code][/noparse] tags. | |
Re: You have this line in your writer `settings.Encoding = System.Text.Encoding.UTF8;` but not your reader. I suspect the reader is looking for UTF16 and not getting what it wants. | |
Re: Let's see the code the writes the file, please | |
Re: [URL="http://en.wikipedia.org/wiki/Closest_pair_of_points_problem"]Closest pair of points problem[/URL] | |
Re: You asked the same question [URL="http://www.daniweb.com/software-development/csharp/threads/353317"]here[/URL] | |
Re: Sounds like you changed it from varchar to integer and didn't change the DataContext to match. | |
Re: Which process are you trying to get the filepath for (the value of name in line 35 of Form1.cs)? | |
Re: The types are immutable, meaning you can't change their value. 3 = 3 no matter what you want it to be. The variable i in your example isn't immutable, it can be any Int32 value. But as was said, the value itself cannot be changed. And as was said in … | |
Re: [code]Process pr = new Process(); pr.StartInfo.FileName = list[i]; pr.StartInfo.WorkingDirectory = Path.GetDirectoryName(list[i]); pr.Start();[/code] | |
Re: Do you have the page as the focused window? | |
Re: [QUOTE=Usmaan;1501909]Now change wordTwo to "***A**".[/QUOTE] First thing you need to learn is that you don't change strings. Strings are immutable, which means you can only create new ones, not change old ones. So you'll have to create a new string with the substituted value. The simplest way to solve your … | |
Re: Try adding [icode]PromationTable.Invalidate()[/icode] right after you set Visible to true. | |
Re: How do you know it isn't being called? Line 42 calls the method by you don't accept the return value into anything. | |
Re: Are there any ' characters in any of the values you are trying to save? The method you are using is opening your system up to a [URL="http://en.wikipedia.org/wiki/SQL_injection"]SQL Injection Attack[/URL]. You should consider using [URL="http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbparameter.aspx"]Parameters[/URL] | |
Re: [code]double rate = RealEstateSalesPerson.rate;[/code] RealEstateSalesPerson is a class, and to access non-static members of a class you need an instance of the class. But you are in a method that is part of the class, so you can access members directly so this line does nothing for you. Remove it. | |
Re: Where is [B]chess[/B] assigned? And what is the [B]PromotionPieces[/B] enum look like? | |
Re: [QUOTE=cscgal;1496061]We already have a Mobile Development forum and it is not very active at all. I'd like to see some more activity revolving around mobile dev before we would consider adding additional forums to cater to it.[/QUOTE] But, the fact that you don't have a forum for it might be … | |
Re: SELECT a.[Email Address], a.CompaignID, a.Source, a.Unsubscribe, b.SeedList, b.ListName from TableA a, TableB b WHERE a.[Email Address] = b.[Email Address] ORDER BY a.[Email Address] | |
Re: You need to show some work at least. What have you done so far? | |
Re: To answer the question, not without using reflection. It would be easier to follow nore's advice and create your own messagebox. [URL="http://help.infragistics.com/NetAdvantage/WinForms/2010.2/CLR2.0/?page=Win_Customizing_Assembly_Resource_Strings.html"]Infragistics[/URL] provides assemblies to do this, but you'd need to pay for it. | |
Re: [URL="http://www.daniweb.com/software-development/csharp/code/352511"]Run Only One Copy using Mutex[/URL] | |
Re: Looks like O(n) from here. The routine is dependent on points.length. The inner part can be considered constant execution time. As the number of points grow, the amount of time grows in direct 1:1 to them. So O(n). | |
Re: You are using C++ syntax to reference members of the class. Did you intend this to be managed C++ or do you want C#? | |
Re: Since you failed to use CODE tags around your code, it's hard to refer to specific lines (and the formatting of the code sucks). In your server routine, you use the construct [icode]while(fs.CanRead)[/icode]. If the file is readable, this should never become false, thus you have an infinite loop of … | |
Re: Did you copy the app.config file into the executable directory? | |
Re: [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.filedialog.aspx"]FileDialog[/URL] [URL="http://msdn.microsoft.com/en-us/library/s2tte0y1.aspx"]File.ReadAllLines[/URL] | |
Re: When you add it to the ArrayList it's losing all it's typing information. You need to tell it what type it is as you cast it: [code]return (Employee[])GetEmployeesArrayList().ToArray(typeof(Employee));[/code] And the updated version of that book is one of my "read next" items :) | |
Re: Where is the file in relation to your executable? | |
| |
Re: Do you use the 'browse to DLL' option when adding the references? Or pick the references from the .NET tab? | |
Re: [URL="http://www.daniweb.com/software-development/csharp/code/350113"]Application Data Files[/URL] | |
| |
Re: You didn't post your Pieces class that I can see, but I suspect it starts like this: [code]class Pieces ...[/code] Notice in, say, line 81 you declare the method as returning a Pieces[,] and that the method is [B]public[/B]. This means that other code can get at a Pieces object, … | |
Re: It's faster to have the code inside the button click event as any call to a method has some overhead. But we are talking about millionths of a second, you won't notice. | |
Re: [code]using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; namespace TestBed { class Program { static void Main(string[] args) { XDocument myDoc = XDocument.Load("myxml.xml"); IEnumerable<String> result = from References in myDoc.Elements() from Sports in References.Elements() from Refs in Sports.Elements() where Refs.Attribute("type").Value == "football" select Refs.Value; foreach (String r in result) { … | |
Re: Since Trim only removes from the beginning and end, the whitespace character at the end doesn't match anything in your char array so it's done trimming. If you are trying to remove characters from the string, then you need to use the Remove method. | |
Re: [URL="http://www.daniweb.com/software-development/csharp/code/350113"]Application Data Files[/URL] | |
Re: [url]http://www.pixel-technology.com/freeware/tessnet2/[/url] | |
Re: Are you using the System.Windows.Forms.ListView or the System.Web.UI.WebControls.ListView? From the error (and usage) you are trying to use the Forms one, but then trying to force a web data item into the control. Which did you intend to use? | |
Re: Some algorithms are easier to explain with math, some with natural language. How to multiply a matrix requires math to explain. A recipe for making a cake is an algorithm. Try to explain it using math. | |
Re: Is your video streaming running on the same thread as your UI? From your code it appears to be doing so. Video capture is slow and is causing your UI to pause while it gets and loads the image. Move the video capture to a different thread. | |
Re: I just created a form with a combobox, set it to dropdownlist and added 'male', 'female' to it. When I select 'male' the text is 4 characters long, 'female' it's 6. It must be something you are doing. How is the combobox populated? | |
Re: It's a static method, you just need it in one file and it will be callable anywhere in your code. | |
Re: dataTable only exist within the context of the method as that is where it was declared. You need to learn about [URL="http://msdn.microsoft.com/en-us/library/aa691132%28v=vs.71%29.aspx"]scope[/URL], [URL="http://www.blackwasp.co.uk/CSharpVariableScopes.aspx"]scope tutorial[/URL] And for future reference, enclose your code in [noparse][code] [/code][/noparse] tags. It keeps the formatting and makes it easier to talk about when I can say … | |
Re: taxpayable = 20 / 100 * actualincome; The result of this is zero. Always. The same with all your other calculations like this. 20 / 100 is done with integer division. 20 / 100 = 0, it's then converted to a double and multiplied by actualincome. 0 times anything is … | |
Re: Really depends on how you decided to implement the chromosomes. |
The End.