2,157 Posted Topics

Member Avatar for HunainHafeez

The garbage collector runs when the system decides that it needs to do so, usualy when you have a lot of fragmented memory that it wants to clean up. An object is unused if it goes out of scope and no variable in scope retains a reference to the object. …

Member Avatar for HunainHafeez
0
217
Member Avatar for aVar++

Well, the ball position Y can't be both greater than man position Y and less than man position Y, which is what your if statement requires. I think you are trying to check if the ball is in the mans 'space', so you'd want to do something like if (ball_position.Y …

Member Avatar for aVar++
0
226
Member Avatar for Momerath

Quite commonly I see people using one of the Parse routines then catching the exception thrown if the parse fails. This is, in general, a bad practice as throwing an exception is slower than using the corresponding TryParse method. This short snippet shows the routines that I used to measure …

Member Avatar for Mickey_1
0
566
Member Avatar for fuhanspujisaputra

OleDB uses the '?' character for parameters, not the SQL Server '@ID' type parameters and assigns them in order from left to right. So your SQL statement should be "DELETE FROM [Record] WHERE [ID] = ?" Check out the example on [this](http://msdn.microsoft.com/en-us/library/50xtbfet.aspx) page. There is also no reason for line …

Member Avatar for ss125
0
171
Member Avatar for computerbear

You have declared your methods static, which makes them class methods. In your code you create an instance of the Accounts class (line 78) then attempt to call these class methods like they are instance methods. Remove the keyword 'static' from the method declarations.

Member Avatar for titali
0
290
Member Avatar for kirennian

Unfortunately only Ultimate has what he's looking for. There are plenty of tools out there that do what he wants, they all just cost.

Member Avatar for Ketsuekiame
0
191
Member Avatar for bullet_1
Member Avatar for Momerath
0
170
Member Avatar for LetGoFool

get and set are used with properties. return is used with methods that want to pass a value back to the calling code. public int Age {get; set;} // Automatic property, don't have to worry // about where it stores the value private int weight; public int Weight { // …

Member Avatar for LetGoFool
0
305
Member Avatar for kiail
Member Avatar for Momerath
0
150
Member Avatar for Jahliah

I don't see how you get anything other than 'A', there is no loop and you only look at the first match.

Member Avatar for Jahliah
0
212
Member Avatar for Galbatorix

In your second block of code, line 32 you create a new Connect object, but then in line 35 you open the connection with that object. But now in line 36 you try to create a SqlCommand object, but you use the connection in the *con* variable rather than the …

Member Avatar for Galbatorix
0
181
Member Avatar for fuhanspujisaputra

Where is 'newval' set prior to line 16? And line 26 isn't doing anything as you don't have any parameters in your SQL statement.

Member Avatar for fuhanspujisaputra
0
215
Member Avatar for Jahliah

No, the output is a DateTime structure. How it stores the information internally isn't important, how you display it is up to you.

Member Avatar for Ketsuekiame
0
272
Member Avatar for Jahliah

You most assuredly can use string in case statements. The restriction is that the values must be constants at compile time. Your problem is that the \ character is an escape character and it thinks you are looking for 000" and there is no closing quote for the string so …

Member Avatar for Jahliah
0
179
Member Avatar for Franze

Run in debug mode and monitor CPU usage. When it jumps up, use the debug menu to 'break' the code and see where it is.

Member Avatar for Franze
0
113
Member Avatar for CCHIndiaStore

I'm going to create a new language and call it "Best" making it the Best programming language!

Member Avatar for mike_2000_17
-3
370
Member Avatar for BlackJax96

I'm not sure what you want. Is it the hex representation of the bits used to represent the float value? If so, you can use something like this: [code]using System; using System.Text; namespace Text { class Program { static void Main() { float f = -2.07217f; byte[] b = BitConverter.GetBytes(f); …

Member Avatar for Ketsuekiame
0
3K
Member Avatar for Galbatorix

Line 42 you return a value. The method stops then, the lines after it never get executed, they are unreachable code. You do this in several places. Once you fix that, you'll get a "not all paths return a value".

Member Avatar for Galbatorix
0
152
Member Avatar for zachattack05
Member Avatar for Momerath

For a bit there, DaniWeb had icons and other graphic elements everywhere! Testing something new?

Member Avatar for ddanbe
0
105
Member Avatar for castajiz_2
Member Avatar for Momerath
0
197
Member Avatar for msamir

First, you couldn't create a new thread for this, you had to find a six year old post to reply to? Second, what value is returned when CartTable.Rows.Count == 0?

Member Avatar for de Source
0
577
Member Avatar for mesbahuk

There are three timers in .NET and depending on what you want to do tells which one you want. All support single or repeated events on a schedule. [System.Timers](http://msdn.microsoft.com/en-us/library/system.timers.timer.aspx) [System.Threading.Timer](http://msdn.microsoft.com/en-us/library/system.threading.timer.aspx) [System.Windows.Forms.Timer](http://msdn.microsoft.com/en-us/library/system.windows.forms.timer.aspx)

Member Avatar for Momerath
0
500
Member Avatar for de Source

Are you running this in debug mode using a file based DB system? If so, Visual Studio makes a copy of the database so you don't mess up the original while debugging.

Member Avatar for de Source
0
182
Member Avatar for glut

> I really don't know why this thing is so slow, when I do the exact same thing in Cheat Engine, it does it immediantly, since I'm targeting notepad, and it scans addresses from 0 to the max value of a long, but mine only goes from 0 to the …

Member Avatar for glut
0
457
Member Avatar for Franze

Yes, create a structure to hold your doubles; public struct MyDoubles { public double one; public double two; public double three; publid MyDoubles(double o, double t, double h) { one = o; two = t; three = h; } } Then you'd call your method MyDoubles senddoubles = new MyDoubles(one, …

Member Avatar for Franze
0
277
Member Avatar for AmrMohammed

One of the things about C# and .NET is that you can only update controls on what is known as the UI (User Interface) thread. If you are using multi-threading you might want to change a control from another thread and this is where *Invoke* and *InvokeRequired* come in handy. …

Member Avatar for Momerath
0
145
Member Avatar for Franze
Member Avatar for Ketsuekiame
0
3K
Member Avatar for Cameronsmith63

Catch the exception try { File.Delete(dir + "\\" + Files[j].ToString()); } catch (Exception e) { } As for why it's saying that something is accessing it, that's because it is. Just because you close a file doesn't mean the system releases the handle on it (and MS recomends that you …

Member Avatar for Cameronsmith63
0
408
Member Avatar for valipour

Not sure what you are asking here. ILMerge lets you package all your assemblies into one assembly. Did you mean you want to package the .NET assemblies too so that the end user doesn't need .NET installed? It would probably work but would be very large, and duplicate assemblies that …

Member Avatar for rubberman
0
301
Member Avatar for Jahliah

This is what you are getting: Before = "Details: Time Deleted = 01:16:30, Time Left = 00:00:00," After = "Details:,Time,Deleted,,,01:16:30,,Time,Left,,,00:00:00," strValues1[0] = "Details:" strValues1[1] = "Time" strValues1[2] = "Deleted" strValues1[3] = "" strValues1[4] = "" strValues1[5] = "01:16:30" strValues1[6] = "" strValues1[7] = "Time" strValues1[8] = "Left" strValues1[9] = "" …

Member Avatar for Jahliah
0
328
Member Avatar for ogsirus

In lines 20, 22, 24, 26 and 30 you want to use 'file' and not 'filename' as 'file' is the name of the loop variable defined in line 15

Member Avatar for ogsirus
0
497
Member Avatar for amrita111

Internal is not the default access modifier. See [this](http://msdn.microsoft.com/en-us/library/ba0a1yw2%28v=vs.80%29.aspx) for more information

Member Avatar for Momerath
0
91
Member Avatar for kiail

Or you could do it with one line myIntArray = myIntArray.Distinct().ToArray(); If you want to tell them as they enter, you'd do something like int position = 0; while (position < myIntArray.Length) { int value; String input = Console.ReadLine(); if (Int32.TryParse(input, out value) { if (myIntArray.Contains(value)) { Console.WriteLine("You already entered …

Member Avatar for kiail
0
226
Member Avatar for kiail

Since the system doesn't know how to compare Ages, you need to implement the IComparable interface on your ages class. Alternitivly you could implement some IComparers to pass to Array.Sort.

Member Avatar for kiail
0
248
Member Avatar for inheaven
Member Avatar for VilePlecenta

Classes are passed by reference, value types and structs are passed by value. You have a class, so it's passed by reference. Just because it contains a value type doesn't make it one.

Member Avatar for zadkielmodelre
0
225
Member Avatar for Kratoswoo

Add a timer to your form, set the interval to 5 minutes and in the Tick event set the box to red. When you update the value, stop and start the timer to reset the 5 minute interval.

Member Avatar for Kratoswoo
0
226
Member Avatar for AmrMohammed

I think you are in the wrong section. C# code wouldn't use those functions, C++ would.

Member Avatar for Momerath
0
48
Member Avatar for farhan mallick

Don't put ' marks around @val1, etc in your SQL statement, the system will handle that for you.

Member Avatar for Momerath
0
106
Member Avatar for nithysony
Member Avatar for ManthanB

You bother to visit the Ghostscript web page? "The leading edge of Ghostscript development is under the GNU Affero GPL license. "

Member Avatar for Momerath
-1
73
Member Avatar for ManthanB

Sure it is. There are plenty of examples of LZW compression if you just search for them. Decompress it, then compress it with CCITT T.6 Search engines are your friend.

Member Avatar for deceptikon
0
4K
Member Avatar for GhostWolf

It sounds like you are defining the structure twice, which makes them different structures (even though they have the same internal data).

Member Avatar for tinstaafl
0
377
Member Avatar for IT_Techno

If you are running in debug mode, Visual Studio makes a copy of the database for you to 'experiment' on, so you don't lose your original database.

Member Avatar for Momerath
0
188
Member Avatar for castajiz_2

Try learning one of the functional languages. Since 'variables' are immutable, you'll learn recursion fast.

Member Avatar for Momerath
0
161
Member Avatar for treasure2387

All the `using` statement does is allow you to use the classes in that namespace without having to give the fully qualified name. So, for example, the `using System.Runtime` lets you used the class GCSettings (again, for example) without having to type `System.Runtime.GCSettings`

Member Avatar for ddanbe
0
141
Member Avatar for castajiz_2

The main thing to remember is that when perm is called inside your loop, all new variables are created for the method.

Member Avatar for ricky.subiantoputra
0
835
Member Avatar for kirtee2209

You'd need ildasm to see what the manifest says the required version, or you can run it and see what it says :)

Member Avatar for kirtee2209
0
419
Member Avatar for redshanks

I'd take a look at [URL="http://www.mathworks.com/matlabcentral/fileexchange/12987"]this[/URL].

Member Avatar for shahebazqz
0
120

The End.