2,157 Posted Topics
Re: Did you display the string 'insert' before you did the insert to see what values it had? | |
Re: in line 4 you are getting the size of the string measured in (most likely) pixels. A single character occupies more than one pixel in width, so there aren't 709 *characters* available, but more than 709 pixels of width. If you are trying to get the longest string with less … | |
Re: Derive your own control and set the default value in the constructor ;) | |
Re: take a look at http://www.daniweb.com/software-development/csharp/code/351471/simple-math-expression-evaluator-using-emit | |
Re: Microsoft beat you to it. http://en.wikipedia.org/wiki/Singularity_%28operating_system%29 And if you think C++ doesn't have runtime libraries, then you have no idea how modern computers work. | |
Re: Did you check the environmental variables that your bat file is using (such as PATH)? It may not be able to find the commands you want it to execute. | |
Re: According to the P/Invoke tool, your DLLImport statement should be [System.Runtime.InteropServices.DllImportAttribute("<Unknown>", EntryPoint="method_4")] public static extern void method_4(ref int buffer) ; Of course you replace the <Unkown> with your dll name. | |
Re: Why are you creating a square class when System.Drawing already has a Rectangle class? | |
Re: Take a look at this http://blogs.microsoft.co.il/blogs/tomershamam/archive/2009/04/14/wpf-commands-everywhere.aspx | |
Re: In C# all math done on integers is converted to Int32 if it is smaller than an Int32. As he said above, you have to explicitly cast them back into the size you want. And while the ++ operator looks like math, it doesn't treat it as math :) | |
Re: > Stimulsoft Go [here](http://stimulsoft.com/RegisteredUsers.aspx?login=yes) and ask them. It amazes me how people ask for help about very specific libraries without going to the people who wrote the libraries. Only reason I can see to not go to the authors site is you pirated a copy of the library. And if … | |
Re: The actual class ProfileCommon is created at runtime if ASP.NET profiles have been enabled. It does this because it creates properties for each of the fields you have enabled in the profile. Since it doesn't know what you have before it runs, it can't create the class. MSDN recommends that … | |
Re: XNA is a framework for building games, it's not a graphics editor, 3d modeler, etc. It contains classes that will simplify making a game, but you'll have to provide all the images. | |
Re: > ProfileCommon It's telling you that it has no idea what this class is. You are missing a using statement and/or a DLL reference. If you are using Visual Studio, hover the mouse over ProfileCommon and you should get a dropdown box, click it and see if it has the … | |
Re: using System; using System.Reflection; public class Example { public static void Main() { // Get the version of the current assembly. Assembly assem = Assembly.GetExecutingAssembly(); AssemblyName assemName = assem.GetName(); Version ver = assemName.Version; Console.WriteLine("{0}, Version {1}", assemName.Name, ver.ToString()); } } There is no static version, as any executing assembly has … | |
Re: This isn't a Light Switch forum, I doubt many use it. Post your question at http://social.msdn.microsoft.com/Forums/en-US/category/vslightswitch | |
Re: Which 'start' button are you refering to, one within your program, or the Windows 'start' button? | |
Re: Line 14 you create an array of CourseName with a size of 4. Line 20 you iterate through all these CourseName objects (foreach on an array gives all array elements, set or not). So since you only set one of the array elements (in line 15), indexes 1, 2, and … | |
Re: Also you only need one event handler and subscribe all the textboxes to it. The sender parameter will tell you which textbox was the one that changed. | |
Re: Depends on how the watermarking is done. Some watermarks use the low order bit of the pixel (thus changing the color slightly, but not enough that you'd notice) and won't change the size of the image at all. | |
Re: Bug on line 69, what if there are no attributes of B? Change it to read if (attributesB == null || attributesA.Count != attributesB.Count) | |
Re: > For 1st time iteration of while loop , nums.count will be equal to 10 and so the value of idx can be 10 also No it can't. Reread the page on Random.Next. The second parameter is the upper bound *exclusive* which means it goes from lower bound to one … | |
Re: You'll probably have to find and ODBC driver for dBase 3 to open the file. No, I don't know where to get one, but you can ask [google](www.google.com) or [bing](www.bing.com) | |
Re: You can also treat a String as a character array, so String charArray = "()+- "; foreach (Char c in charArray) { ... Is perfectly valid | |
Re: Line 11 doesn't work if both are positive values. For example, if the range was 1.0 to 3.0, you'd get 3.0+1.0 = 4,0, so values from 0.0 to 4.0, then you'd subtract one from that giving values from -1.0 to 3.0. There is no need to use Math.Abs array[i, j] … | |
Re: The screen size is a design time feature, not a runtime feature. There is a [Screen](http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.aspx) class for you to get the various attributes of the screen(s). | |
Re: There are many ways to do this foreach (String[] arr in parsedData) { // add to your string array here } // or you can for (int i = 0; i < parsedData.Count; i++) { parsedData[i] ... // this is the string array, add to it } Without knowing more … | |
Re: > Tip: When catching exceptions, it is a good idea to use Exception instead of a specific exception like DivideByZeroException so you can catch all the errors This is really bad advice. Never catch Exception, always catch the specific exception. How can you recover from an exception if you don't … | |
Re: Add `measResultsGraph.Refresh()` after where you change the title | |
Re: You can use a switch statement like this: switch (Location.InitialCheckState) { case CheckState.Checked: case CheckState.Indeterminate: // do stuff break; case CheckState.Unchecked: // do other stuff break; default: // Something is wrong here as it has to be one of the above throw new ArgumentException("Invalid value for Location.InitialCheckStat = " + … | |
Re: If the application hangs how can it execute anything? You need to figure out what the problem is. | |
Re: If you want all the elements of L2 added to L1 you can add them individually: foreach(LinkedListNode<String> item in L2) { L1.AddLast(item); } Or you can create a new LinkedList with all of them in it: LinkedList<String> L3 = new LinkedList(L1.Concat(L2)); | |
Re: Round the number to a fixed number of decimal places. This will stop slight variations in values from having an effect on what you are doing. | |
Re: I tend to name it based on what I'm adding to the control. Using your control as an example, it would be DataboundCheckListBox. I use namespaces for keeping stuff organized by company. And no, there really isn't a performance change, it's more of a "what am I trying to accomplish … | |
| |
Re: That's what version control software is for. I think Subversion is free (and common, at least by the job postings I see). Just do a search on Version Control Software, should get you lots of results. | |
Re: A few things, First, do you have to do the conversion yourself? The .NET library has a method that will do this for you. Second, do you have to use an array? If you want something in the reverse order that you generate it, a Stack is the data structure … | |
Re: I'm guessing it occurs on line 46 or 51 depending on how you set the checkboxes. What the error means is that you've declared a spot to hold an object, but never created the object. You do this in lines 5-6 of your code. tran1 and tran2 are spots to … | |
Re: Your suggested change just shows that you have no idea what 'using' is doing. It is not importing anything. It's just telling the compiler that you want to use a shortcut for the name of some classes. C# is not C/C++. Just because they have similar syntax doesn't mean they … | |
Re: Where is paramArray declared? Where is it added to the command? | |
Re: You may think it holds numbers, but it is telling you that it holds strings (The System.String part of the error). You are trying to convert this string into a ListBoxItem, which it cannot do. Based on the next few lines, all you need to do is assign the value … | |
Re: http://www.dreamincode.net/forums/topic/33396-basic-clientserver-chat-application-in-c%23/ Took 1/2 a second on google to find this information. | |
Re: Works find here on my 64bit processor (I did have to change the paths, but that doesn't change the logic). You need to be a lot more descriptive. What do you mean by "doesn't work"? Does anything happen? Do you get an error message? If so, what does it say? … | |
Re: I disagree with (1) above, I use regions all the time, as does everyone that I've worked with. YMMV, I guess. I organize code into: Class variables Constructors Properties Methods Interface Implementations Private methods Nested Classes | |
Re: Program is a class, StreamReader is a constructor that constructs a class of type StreamReader. The Program class is not a StreamReader class. After you figure that out, you'll get an error in line 4 :) | |
Re: Use Distinct: var itemSorted = (from it in items orderby it ascending select it).Distinct(); | |
Re: Did you read the documentation on that page? It says, in case you didn't, that you can get the String from the bytes by using **System.Text.Encoding.AsciiEncoding**. Did you read about that class? Did you notice the [GetBytes](http://msdn.microsoft.com/en-us/library/ds4kkd55.aspx) method? | |
Re: Then you want an Inventory Management System, not a CMS. Try [here](http://www.freedownloadscenter.com/Business/Inventory_Systems/) | |
Re: Notice that you are using a qualified name for the object (you are placing the namespace in front to specify it), thus in the scope of your code there is no class named 'LocationEditor' so the compiler has no problem with using it as a variable name. If, by chance, … | |
Re: Not without seeing the code, no. |
The End.