2,157 Posted Topics

Member Avatar for silvercats

If you want to have more than one of them, then it can't be static. Objects are allocated on the heap, not sure what else you want to know.

Member Avatar for silvercats
0
761
Member Avatar for krish3390

From [Eric Lippert's blog](http://blogs.msdn.com/b/ericlippert/archive/2009/02/02/properties-vs-attributes.aspx): Think about a typical usage of attributes: [Obsolete] [Serializable] public class Giraffe : Animal { ... Attributes typically do not have anything to do with the semantics of the thing being modeled. Attributes are facts about the mechanisms - the classes and fields and formal parameters …

Member Avatar for Momerath
0
174
Member Avatar for de Source

The error is caused by this "SELECT * FROM tbl_student WHERE" + ddl_SearchBy.SelectedValue + "= @" + ddl_SearchBy.SelectedValue + "" Pretend the SelectedValue is the word 'Tuesday' (without the quotes. This becomes "SELECT * FROM tbl_student WHERETuesday= @Tuesday" Do you see what you are missing? I also don't think your …

Member Avatar for de Source
0
838
Member Avatar for Forte1292

Since your problem is one of permutations, using an array and something like [this](http://www.daniweb.com/software-development/csharp/code/349081/permutation-generation) will let you generate the arrangement as you need it.

Member Avatar for Momerath
0
259
Member Avatar for NidhiSree

Try setting `Font = null;` in the Dispose method of TextBoxEx. I don't see anything here that would cause a GDI leak.

Member Avatar for Ketsuekiame
0
1K
Member Avatar for davecoventry

`x*(x-2h+m*m*x+2*m*c-2*m*k) = r*r-h*h-c*c-2*c*k-k*k` If you distribute the x on the left side you get `x^2-2hx+mmx^2+2mcx-2mkx` Combining like terms gets you (and bringing the right side over to the left) `(mm+1)x^2+(2mc-2h-2mk)x + h^2+c^2+2ck+k^2-r^2 = 0` Since m, c, h, k and r are all constants, you can substitute `a = mm+1` …

Member Avatar for Momerath
0
398
Member Avatar for Lardmeister

Ln 100,000,000 = 18.42068 Ln 150,000,000 = 18.82615 It should have increased 2%, not 1.522 times (52%).

Member Avatar for kplcjl
0
1K
Member Avatar for zachattack05

First, you don't use integrated security. Users have no permissions on the database, just the server does. Everyone talks to the server, server talks to the database (n-tier). Users can install whatever SQL tool they want, but they can't get through the databases firewall, since it only accepts connections from …

Member Avatar for zachattack05
0
212
Member Avatar for WDrago

Like Zach said you can think of them as a folder tree, and I actually use a folder tree with the same structure as my namespaces :) My largest project currently has: Momerath.Collections Momerath.Collections.Generic Momerath.Extensions Momerath.Numerics Momerath.Sharith Momerath.Sharith.Arithmetic Momerath.Sharith.Math Momerath.Sharith.Math.MathUtils Momerath.Sharith.Math.Primes Momerath.Strings Momerath.Strings.Search And I have some other stuff I'm …

Member Avatar for Ketsuekiame
0
205
Member Avatar for yudi2020
Member Avatar for tinstaafl
0
138
Member Avatar for Sammys.Man

Assuming you've declared all the variables correctly foreach(DataRow row in dt.Rows) { if (tbox_Username.Text == row.Item[0] && tbox_Password.Text == row.Item[1]) { Position = row.Item[2]; Fname = row.Item[3]; Lname = row.Item[4]; con.Close(); return true; } } con.Close(); return false; But there are better ways of checking for valid login that don't …

Member Avatar for Sammys.Man
0
148
Member Avatar for Himanshu Chawla

This line char[] str = new char[10]; You can get rid of everything after *str* as you replace what was created when you assign the ReadLine() result to it.

Member Avatar for Momerath
-1
147
Member Avatar for Dark_Omen

Commenting on an 8 year old post and directing it to someone who hasn't logged on in 3 years. I'm sure he'll get right on that.

Member Avatar for Momerath
0
3K
Member Avatar for silvercats

1) The C++ dll has nothing to do with CLR 2) You have to use the CLR or it's not a .Net language 3) It compiles it 'just in time' for execution 4) It's MSIL 5) Sort of. There have been specialized processors built that 'understand' a specific language and …

Member Avatar for silvercats
0
265
Member Avatar for sk8ergirl

Don't select all of them, just select the one you want to check and see if anything is returned. Much faster.

Member Avatar for Momerath
0
181
Member Avatar for terrier_unknown

After the [Singularity](http://en.wikipedia.org/wiki/Technological_singularity) no one will do any more programming.

Member Avatar for <M/>
0
157
Member Avatar for PerplexedB

Constructors don't have return types (they are returing the object being constructed and the compiler is smart enough to know this) so when you declare it as **void**, it thinks you are trying to define a method with the same name as the class.

Member Avatar for PerplexedB
0
113
Member Avatar for <M/>

Depends. Do you have a static Main method in your code? We can't see what you've done from here.

Member Avatar for tinstaafl
0
191
Member Avatar for ahmzy

Line 211 I assume. Where is e defined such that it is in scope? Nowhere, and that's why you get the error. Why do you create that other method to handle the event? Just put the code in the event, or pass 'e' to the method.

Member Avatar for ahmzy
0
1K
Member Avatar for gamers18

Not without seeing all the code. We can't tell how you implemented your graph structure as we can't see your screen from here.

Member Avatar for Ketsuekiame
0
132
Member Avatar for gamers18

Loops foreach(String key in dic.Keys) { foreach(String item in dic[key]) { Console.Write("{0}, ", item); } Console.WriteLine(); }

Member Avatar for tinstaafl
0
5K
Member Avatar for ryan311

Get a list of the files, pull the version number out of the name, delete the older ones. You'll want to look at [Directory](http://msdn.microsoft.com/en-us/library/system.io.directory.aspx), [String.Split](http://msdn.microsoft.com/en-us/library/system.string.split.aspx) or [String.IndexOf](http://msdn.microsoft.com/en-us/library/5xkyx09y.aspx), [String.Substring](http://msdn.microsoft.com/en-us/library/aka44szs.aspx) and [Double.Parse](http://msdn.microsoft.com/en-us/library/fd84bdyt.aspx). You could also do it with [Regex.Match](http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.match.aspx)

Member Avatar for Ketsuekiame
0
228
Member Avatar for jt_murphree

Oracle (like most databases) doesn't support passing in multiple values as a single parameter. So you are stuck doing one of two things: 1) Build the SQL statement dynamically, adding as many parameters as you need. 2) Create a function in Oracle that takes a string and splits it into …

Member Avatar for Momerath
0
102
Member Avatar for sk8ergirl

Check if it's in the ListBox first if (ListBox1.Items.Contains(id) == false) ListBox1.Items.Add(id);

Member Avatar for Momerath
0
107
Member Avatar for JOSheaIV

At the very least you should be calling [Thread.SpinWait](http://msdn.microsoft.com/en-us/library/system.threading.thread.spinwait.aspx) so your threads will let other stuff run while they idle. You also might consider using Monitor.Wait and Monitor.Pulse to stop/start your processes.

Member Avatar for JOSheaIV
0
214
Member Avatar for SCass2010
Member Avatar for NidhiSree

Windows Forms applications support TrueType fonts and have limited support for OpenType fonts. If the familyName parameter specifies a font that is not installed on the machine running the application or is not supported, Microsoft Sans Serif will be substituted. Also The text rendering offered by the TextRenderer class is …

Member Avatar for Momerath
0
237
Member Avatar for chordian12
Member Avatar for pwolf

Well, with the property it would be **GlobalClass.GlobalVar**, you don't have access to m_globalVar.

Member Avatar for ddanbe
0
346
Member Avatar for <M/>

To get a int, you can try something like this int myNumber; String input; do { Console.Write("Enter a number : "); input = Console.ReadLine(); } while (Int32.TryParse(input, out myNumber) == false); This will prompt the user over and over again for a number (integer number) until they enter one.

Member Avatar for tinstaafl
0
224
Member Avatar for vkvkvk

One way to do it is to make sure that the class T implements IComparable class MyClass<T> where T : IComparable This will work, but limits the user of the class to defining one and only one way to arrange the objects. A better way is to use the IComparer …

Member Avatar for vkvkvk
0
283
Member Avatar for write.me

And [this](http://www.daniweb.com/software-development/csharp/code/351309/a-collection-of-sorts)

Member Avatar for ddanbe
0
1K
Member Avatar for adem87
Member Avatar for jangojan
Member Avatar for nickayin

Of course your code doesn't work, you've told it not to do so. Think about what happens on each line. For example, you set curLine to 0 on line 4. Then on line 8 you increment curLine. Line 9 you ask "is curLine equal to zero?". It never will be …

Member Avatar for ddanbe
0
1K
Member Avatar for <M/>

Note that random is from the low number inclusive, to the high number exclusive. So Random.Next(0,10) generates a number from 0 to 9, not 0 to 10. Random.Next(100) generates a number from 0 to 99. If you want a number from 1 to 10, use Random.Next(0,10) + 1

Member Avatar for <M/>
0
338
Member Avatar for NidhiSree

Where do the classes NativeListWindow, Win32, ComboBoxInfo, etc. come from? They aren't C# classes. I suspect you want the C++ forum.

Member Avatar for NidhiSree
0
2K
Member Avatar for danimischiu

You need to be more clear about what you mean when you say "nothing happens". You do know that Visual Studio makes a copy of your database when you are running in Debug mode, so you won't see any changes in the original?

Member Avatar for danimischiu
0
274
Member Avatar for rrr12345

I'd just use one of the many twitter C# libraries (like [this](http://ntwitter.codeplex.com/) one). You can also use that to see how they accomplished what you are trying to do.

Member Avatar for riahc3
0
337
Member Avatar for i_tec

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

Member Avatar for Momerath
0
33
Member Avatar for ryan311
Member Avatar for IT_Techno
Member Avatar for dana2292

There are many ways to read a text file in C#. Which do you want to do: 1) Read 1 character at a time 2) Read 1 line at a time 3) Read all the lines and put them into an array. 4) Read the entire file as one long …

Member Avatar for castajiz_2
0
403
Member Avatar for castajiz_2

c is a local variable, it doesn't exist outside the method. What is happening is you are passing in a string (the textbox) then changing what c is referencing, not the value that it is referencing. This has no effect on the Textbox reference. Returning a value is the prefered …

Member Avatar for tinstaafl
0
310
Member Avatar for CPT

For lines 10-12 you can parallelize the outer loop, but not the inner. Also it will error on the first iteration as there is no index -1 (j = 0, j-1 = -1).

Member Avatar for rubberman
1
251
Member Avatar for cerealBoxx

In line 12 you declare the method as *void*, meaning there is no return value. In line 20 you tell the Console.WriteLine to use the return value from ReturnPattern, which as we've previously seen, it has none. This is your error. If you want to use it as part of …

Member Avatar for ddanbe
0
144
Member Avatar for sundog1

What this means is that the cashOrders table is actually based off information from two tables (or more). What's the statement you use to get the information for the cashOrders table?

Member Avatar for Momerath
0
878
Member Avatar for sumitrapaul123

Why are you implementing IDisposable at all? You don't allocate any unmanaged resources, so there is no need for you to do so. Also, this is C#, we don't normally have destructors unless there is a good reason to do so. This isn't one of them.

Member Avatar for deceptikon
0
128
Member Avatar for <M/>

Visual Studio runs on Windows, so you'll have to have Windows to use it. But, there is [MonoDevelop](http://monodevelop.com/) which will run on a Mac.

Member Avatar for <M/>
0
169
Member Avatar for Gaving30
Member Avatar for daniel955
0
108

The End.