4,439 Posted Topics

Member Avatar for ddanbe

Hi all, I can easily add this using clause with no errors to my program. [B]Using System.Numeric;[/B] I have VS 2008 C#. But I'm not seem to be able to use it. The Object Browser gives no clue either. Any suggestion is very welcome.

Member Avatar for lighthead
0
136
Member Avatar for papanyquiL

@Serkan : I'm not an expert in English nor in C#. IMHO Scott will deserve that epitheton for C#. But I see it this way : [B]My car doesn't start.[/B] Means: I tried to start my car [B]now[/B], but without effect. [B]My car won't start.[/B] Means: I already started my …

Member Avatar for serkan sendur
0
411
Member Avatar for serkan sendur

Glad you're happy Serkan:) If you want your dictionary always sorted you could use SortedDictionary like this: [CODE=c#]class Program { static void Main(string[] args) { // Make a new dictionary of strings, with int keys. Dictionary<int, string> MyCoctails = new Dictionary<int, string>(); // Get the keys with the Keys property. …

Member Avatar for serkan sendur
0
151
Member Avatar for TheFoeHammer

Just to be sure : is your file named Example.[B]I[/B]nk or Example.[B]l[/B]nk ?

Member Avatar for Nick Evan
0
460
Member Avatar for mugdha_2005

Do an elevator simulation with at least 3 elevators and 7 floors. And learn to write some decent English.

Member Avatar for kiamzattu
0
167
Member Avatar for nivielan

See you are making use of the snippet: [url]http://www.daniweb.com/code/snippet1022.html[/url] Nothing wrong with that it is there to get used. But in the explanation of that snippet I explain I call this code from the Paint event, not from the Load event of the form.

Member Avatar for ddanbe
0
102
Member Avatar for Dajer

If you search for [B]print datagrid [/B]on this site you will find lots of threads on the subject. Example : [url]http://www.daniweb.com/forums/thread202609.html[/url]

Member Avatar for ddanbe
0
105
Member Avatar for scholar
Member Avatar for spalanivel
Member Avatar for rahulsundar_007

IMHO characters in a bitmap or jpeg or whatever consist of colored pixels, just like the rest of the image. In a text there is a relation of the characters with some kind of code like ASCII, you don't have that in an image.

Member Avatar for sknake
0
334
Member Avatar for clueless123

[QUOTE] i tried putting the count into an arraylist and sort it from there but it does not work[/QUOTE] Could you show us the code that did not work?

Member Avatar for serkan sendur
0
92
Member Avatar for sambafriends

Operator overloads sure have their use. I don't see why you want to overload the C# ++ operator! It is there for your use! So use it as such, don't get fancy because you like to do it. An index can easely be incremented with ++. Einstein once said: keep …

Member Avatar for Ramy Mahrous
0
177
Member Avatar for sivak

Salem, don't bother... Whenever sivak has forgotten to take his pills he starts to spam this site with trivial questions. Harmless maybe, I consider this person nowhere to be found in a giant void.

Member Avatar for serkan sendur
0
138
Member Avatar for CppBuilder2006

As you know C++ already, learning C# will not be so difficult. Although both languages have much in common there are differences. I suppose you want to work in a .NET environment. Now THAT will be the hardest part to learn I guess. .NET is HUGE! About 12 months ago …

Member Avatar for Ramy Mahrous
0
145
Member Avatar for 666kennedy

There is a file copy method in the File class : File.Copy( OriginalPath, CopyPath );

Member Avatar for 666kennedy
0
315
Member Avatar for wingers1290

I think you have to look in the Controls collection of panel1, now you are looking in the Controls collection of the form. So instead of [B]Controls.Find [/B]use [B]panel1.Controls.Find[/B]

Member Avatar for wingers1290
0
230
Member Avatar for mansi sharma

lnewvalue is an integer. You must use a char or a string here. Remark: I would not use [B]Array [/B]as a variable name, because it is also a type in .NET. Choose a more appropriate name instead.

Member Avatar for sknake
0
136
Member Avatar for Dum_

Use something like this: [CODE=c#]using (StreamReader sr = new StreamReader(path)) { while (sr.Peek() >= 0) { Console.WriteLine(sr.ReadLine()); } }[/CODE]

Member Avatar for Dum_
0
134
Member Avatar for wingers1290

A Form has a Controls collection. To Add a control at runtime you say :[B] Myform.Controls.Add(MyTextbox);[/B] To remove it you use[B] Myform.Controls.Remove(MyTextbox);[/B]

Member Avatar for ddanbe
0
159
Member Avatar for wingers1290

To make it not so messy you could define a string like this : [B]string selection = comboBox19.Items[comboBox19.SelectedIndex].ToString() ;[/B] and change your if-statement in : [CODE=c#]if (selection == "Clear Float") glassType10 = 200; else if ( selection == "Low E") glassType10 = 250; //......[/CODE] Yes, you may omit the curly …

Member Avatar for wingers1290
0
102
Member Avatar for scru
Member Avatar for kspriya01
Member Avatar for tdeck
0
84
Member Avatar for thr

Here is a comparision between the syntax of the two languages: [url]http://www.harding.edu/fmccown/java_csharp_comparison.html[/url] A language as such, does not do that much. It is the framework or the libraries that come with it, that make it powerfull. You choose the language you feel most confortable with. This decision is all up …

Member Avatar for Ramy Mahrous
0
237
Member Avatar for madhan0208

I found this Tamil unicode chart which may help a little : [url]http://www.unicode.org/charts/PDF/U0B80.pdf[/url]

Member Avatar for madhan0208
0
45
Member Avatar for serkan sendur

I should say: overide the Show method of the MessageBox class. In the overide play the sound(async), then Show the messagebox.

Member Avatar for serkan sendur
0
2K
Member Avatar for petya.ivanova

The outcome of [B]if ((max_value - min_value) < 0.01)[/B] depends on the values in your table. If this never becomes true, you iterate forever and will get a stackoverflow.

Member Avatar for petya.ivanova
0
96
Member Avatar for lllllIllIlllI
Member Avatar for ddanbe
0
154
Member Avatar for FJones

CalculateTotal should only do what it says : Calculate a total. Your method writes the result of a power calculation to the console. In a small program like this it seems not to matter too much, but if you are working on a large project with many programmers, such things …

Member Avatar for ddanbe
0
103
Member Avatar for Pokenerd

The String class has a [B]Remove [/B]method. It can remove chars from a certain position and of a certain length.

Member Avatar for Ancient Dragon
0
93
Member Avatar for JerezFinest

[QUOTE]I got the code for the exit button which is: this.button2.Click += new System.EventHandler(this.button2_Click); this.Close();[/QUOTE] The code will compile, but it seems to me like you are blinded and then try to break an egg with a stick. Are you using VS 2008 C# or a C# command line compiler? …

Member Avatar for ddanbe
0
579
Member Avatar for chathuD

You may also lokk at this snippet : [url]http://www.daniweb.com/code/snippet1094.html[/url]

Member Avatar for Ramy Mahrous
0
151
Member Avatar for funfullson

Have a look at this: [url]http://www.xmlfox.com/print_datagridview.htm[/url] BTW: [COLOR="Red"]I need it urgent.[/COLOR] does not give me the impression you are a friendly person. What about [COLOR="Green"]Could someone out there offer any help?[/COLOR] Besides, the link I gave you took me 5 secs to google...

Member Avatar for ddanbe
0
279
Member Avatar for S2009

You already posted the same thread on wich we gave replies : [url]http://www.daniweb.com/forums/thread202311.html[/url]

Member Avatar for ddanbe
0
115
Member Avatar for ddanbe

Hi all, I have made (just to learn C#) a calculator program, which is working OK. I made a Round button class for it, but the edges of the buttons still look "crispy". I set [B]SmoothingMode [/B]and [B]PixelOffsetMode[/B] to [B]HighQuality[/B] but it seems to have no effect. Is this once …

Member Avatar for emarshah
0
878
Member Avatar for tdeck

An apple an a pear are both fruits. You can even say that they belong to the same plant family [url]http://en.wikipedia.org/wiki/Rosaceae[/url] You can never say an apple IS a pear.

Member Avatar for ddanbe
0
105
Member Avatar for jasscat

This works with me: decimal dec = 123.4567M; string str = dec.ToString("0.##"); MessageBox.Show(str); MessageBox.Show(String.Format("{0:0.##}", dec)); dec = 123.0M; str = dec.ToString("0.##"); MessageBox.Show(str); MessageBox.Show(String.Format("{0:0.##}", dec));

Member Avatar for jasscat
0
180
Member Avatar for JakShelar
Member Avatar for jaymar_jmj

Just so happens I was doing some "animation" testing with matrix transforms. Put it in a snippet: [url]http://www.daniweb.com/code/showsnippet.php?codeid=1250[/url]

Member Avatar for Ramy Mahrous
0
216
Member Avatar for AnkitKumar

Is it so hard to post your code in this format? Using code tags I believe this is your MergeSort function : [CODE=c#]public void MergeSort(int l, int h) { if (l >= h) { return; } int mid = (l + h) / 2; MergeSort(l, h); MergeSort(mid + 1, h); …

Member Avatar for ddanbe
0
396
Member Avatar for S2009

Reading this might help : [url=http://www.codeproject.com/KB/cs/datetimelib.aspx?fid=188986&df=90&mpp=25&noise=3&sort=Position&view=Quick&fr=26&select=1153099]info[/url]

Member Avatar for serkan sendur
0
305
Member Avatar for lagspike

Perhaps something like this: string str = string.Empty; DateTime T = DateTime.Now; str = T.ToString("hh:MM:ss"); MessageBox.Show(str);

Member Avatar for serkan sendur
0
140
Member Avatar for tdeck

NumericUpDown does not work with [B]integer [/B]but with the data type [B]decimal[/B] It ranges from +-1.0 X 10e-28 to +-7.9 X 10e28.

Member Avatar for ddanbe
0
2K
Member Avatar for Sazabi02

I think I know what you mean, but give yourself some simple goals, like: print out the numbers 1 to 10 and their squares. Or: draw a blue rectangle on a yellow background. You can only train yourself in programming, by programming for yourself, no matter what the exercise is.

Member Avatar for Sazabi02
0
192
Member Avatar for emarshah

Your code seems pretty OK. In the example you give [B]ammar hassan[/B], could it be that there is a space char instead of a tab char between ammar and hassan?

Member Avatar for Ramy Mahrous
0
183
Member Avatar for thanatos1

I downloaded it about a year ago, still learning:cool: but I believe I can help. Your code : [B]if (ok.player > 51% ok.maxhp)[/B] The % is not what you think a percentage, it is the modulo operator! So you are comparing something against 51 modulo ok.maxhp, which is not what …

Member Avatar for ddanbe
0
149
Member Avatar for john_beginner

You have several options here : If eno is an int then: eno = Convert.ToInt32(Console.ReadLine()); or eno = int.Parse(Console.ReadLine()); or bool succes = int.TryParse(Console.ReadLine(), out eno);

Member Avatar for ddanbe
0
170
Member Avatar for andreivanea

Lines 16 and 17 of your code never get executed, because the function on line 22 always returns false. Play computer like I did! It's fun! You will see why your int array fills up with all nines!

Member Avatar for Poab9200
0
6K
Member Avatar for achristov

I fully agree Ramy! Does a [B][COLOR="Red"]}[/COLOR][/B] counts as a line of code? Hard work indeed!

Member Avatar for Poab9200
0
147
Member Avatar for Dajer

MessageBox is very versatile, but you cannot use a radiobutton in it. For that you have to design your own dialog, which is something not so difficult to do.

Member Avatar for ddanbe
0
90
Member Avatar for scholar

When I experience a NullReference exception(using VS 2008) The line that it occured in is pointed out to me, together with some tips. Could you please give us the line where the NullRef occured? Also the use of [COLOR="Red"]code tags [/COLOR]is strongly reccomended.

Member Avatar for Ramy Mahrous
0
71

The End.