2,157 Posted Topics

Member Avatar for robin99

Did you display the string 'insert' before you did the insert to see what values it had?

Member Avatar for robin99
0
103
Member Avatar for nicewave

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 …

Member Avatar for Momerath
0
273
Member Avatar for zachattack05
Member Avatar for zachattack05
0
95
Member Avatar for shajis001

take a look at http://www.daniweb.com/software-development/csharp/code/351471/simple-math-expression-evaluator-using-emit

Member Avatar for Momerath
0
314
Member Avatar for MasterHacker110

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.

Member Avatar for Godfear1
0
203
Member Avatar for witchDoc

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.

Member Avatar for witchDoc
0
112
Member Avatar for wlalth

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.

Member Avatar for Momerath
0
469
Member Avatar for king03

Why are you creating a square class when System.Drawing already has a Rectangle class?

Member Avatar for lxXTaCoXxl
0
149
Member Avatar for jrosh

Take a look at this http://blogs.microsoft.co.il/blogs/tomershamam/archive/2009/04/14/wpf-commands-everywhere.aspx

Member Avatar for Sahil89
0
239
Member Avatar for murnesty

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 :)

Member Avatar for Momerath
0
258
Member Avatar for jas2010

> 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 …

Member Avatar for Momerath
0
100
Member Avatar for zemzela

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 …

Member Avatar for zemzela
0
157
Member Avatar for king03

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.

Member Avatar for lxXTaCoXxl
0
271
Member Avatar for zemzela

> 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 …

Member Avatar for hericles
0
175
Member Avatar for zachattack05

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 …

Member Avatar for zachattack05
0
130
Member Avatar for saybabs

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

Member Avatar for Momerath
0
78
Member Avatar for ogsirus

Which 'start' button are you refering to, one within your program, or the Windows 'start' button?

Member Avatar for skatamatic
0
196
Member Avatar for infinitus

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 …

Member Avatar for skatamatic
0
179
Member Avatar for murnesty

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.

Member Avatar for Momerath
0
149
Member Avatar for sandz24

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.

Member Avatar for sandz24
0
130
Member Avatar for PatSharbaugh

Bug on line 69, what if there are no attributes of B? Change it to read if (attributesB == null || attributesA.Count != attributesB.Count)

Member Avatar for PatSharbaugh
0
2K
Member Avatar for RanbirSandhu

> 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 …

Member Avatar for RanbirSandhu
0
156
Member Avatar for mr_scooby

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)

Member Avatar for Momerath
0
103
Member Avatar for zachattack05

You can also treat a String as a character array, so String charArray = "()+- "; foreach (Char c in charArray) { ... Is perfectly valid

Member Avatar for zachattack05
0
114
Member Avatar for bastiaanvos

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] …

Member Avatar for Momerath
0
220
Member Avatar for Suffii

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).

Member Avatar for Momerath
0
134
Member Avatar for spowel4

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 …

Member Avatar for thines01
0
189
Member Avatar for Thethief92

> 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 …

Member Avatar for skatamatic
0
109
Member Avatar for Tortura
Member Avatar for Tortura
0
453
Member Avatar for zachattack05

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 = " + …

Member Avatar for zachattack05
0
176
Member Avatar for arunkumars

If the application hangs how can it execute anything? You need to figure out what the problem is.

Member Avatar for arunkumars
0
187
Member Avatar for Alicito

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));

Member Avatar for Momerath
0
261
Member Avatar for cbartondock

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.

Member Avatar for cbartondock
0
157
Member Avatar for zachattack05

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 …

Member Avatar for zachattack05
0
126
Member Avatar for murnesty
Member Avatar for Mitja Bonca
0
127
Member Avatar for zachattack05

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.

Member Avatar for zachattack05
0
102
Member Avatar for castajiz_2

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 …

Member Avatar for castajiz_2
0
167
Member Avatar for dsmoore

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 …

Member Avatar for dsmoore
0
222
Member Avatar for ShadyTyrant

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 …

Member Avatar for thines01
0
134
Member Avatar for winnitbaker
Member Avatar for fka

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 …

Member Avatar for fka
0
194
Member Avatar for poloblue

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.

Member Avatar for Momerath
0
258
Member Avatar for gogs85

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? …

Member Avatar for gogs85
0
117
Member Avatar for zachattack05

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

Member Avatar for zachattack05
0
141
Member Avatar for masterinex

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 :)

Member Avatar for Momerath
0
257
Member Avatar for kiail

Use Distinct: var itemSorted = (from it in items orderby it ascending select it).Distinct();

Member Avatar for kiail
0
114
Member Avatar for VasquezPL

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?

Member Avatar for Momerath
0
2K
Member Avatar for vishalrane
Re: CMS

Then you want an Inventory Management System, not a CMS. Try [here](http://www.freedownloadscenter.com/Business/Inventory_Systems/)

Member Avatar for epicrevolt
0
78
Member Avatar for zachattack05

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, …

Member Avatar for zachattack05
0
127
Member Avatar for espinosae

The End.