4,439 Posted Topics

Member Avatar for mikaandy83

What have you tried for yourself? We are all willing to help you here with your questions, but you got at least show some effort. Momerath has given you all the info you need to get started. So start to program. If you show some of your(even not working) code, …

Member Avatar for Momerath
-1
186
Member Avatar for whitetigerclaws

Hi WhiteTigerclaws, welcome to DANIWEB. I you post code please do it between code tags. Have not much time now but : [CODE=c#]private void btnDisplayScores_Click(object sender, EventArgs e) { scores.Sort(); string scoresString = "List of all scores entered :\n\n"; foreach (int i in scores) scoresString += i + "\n"; MessageBox.Show(scoresString, …

Member Avatar for sean_king
0
345
Member Avatar for Erslich

Seems to be a rather "popular" topic around here. Look at this thread: [url]http://www.daniweb.com/forums/thread237654.html[/url]

Member Avatar for Chrisakak9
0
622
Member Avatar for Coemgen3

@daniel955 Your outer loop goes from 1 to 3, the OP wants it from 1 to 4. The inner loop should probably go from 0 to 9

Member Avatar for kplcjl
-1
133
Member Avatar for ali_zdn

Please use code tags if you post any code. Perhaps this bit of code will get you on the right track: [CODE=c#]class Program { static void Main(string[] args) { List<istanbul> ap = new List<istanbul>(); ap.Add(new istanbul("dsklfjsf", 12)); foreach (istanbul o in ap) { Console.WriteLine(o.Name); } Console.ReadKey(); //in debug mode } …

Member Avatar for Geekitygeek
0
172
Member Avatar for yamini222

Suspect you want to test for zero, rewrite line 3 like this: [CODE=c#]c[i][j] = counts[i] == 0 ? c1[i][j] / counts[i] : c1[i][j];[/CODE] As Momerath already pointed out, you cannot use things like [B]while(0)[/B] in C#. I love C# for it!!! :)

Member Avatar for ddanbe
0
97
Member Avatar for ddanbe

On the tenth october 2010 it is going to be 10 10 10! (42 decimal in binary)

Member Avatar for nick.crane
2
104
Member Avatar for amitchawla

[CODE=C#]while(1)[/CODE] This will never work, C# expects a boolean or an expression that resolves to a boolean. The number 1 resolves to an integer. This is one of the reasons I prefer C# over C and C++ !

Member Avatar for rohand
0
126
Member Avatar for skybomb0

Well, the web page does not open... Besides, if you are just learning to program, I would probably not start with a game like Yahtzee.

Member Avatar for karylm
0
183
Member Avatar for becky007

Use the generic Queue type available in .NET Something like: [CODE=c#] Queue<patient> PatientsWaiting = new Queue<patient>(); patient P = new patient(); P.Name = "Smith"; PatientsWaiting.Enqueue(P);[/CODE]

Member Avatar for becky007
0
106
Member Avatar for buster2209

Without sending us some of your code or at least telling us what your code does, it is very difficult to answer your question.

Member Avatar for nick.crane
0
97
Member Avatar for hi5.ankit

Or have a look at this snippet : [url]http://www.daniweb.com/code/snippet256776.html[/url]

Member Avatar for ddanbe
0
95
Member Avatar for Steve_Jones

Another way of doing this; is by clicking in the leftmost column of a code listing. A brownish ball will appear and your program will stop there if it is run. You have set a BREAKPOINT! If your program does not stop there, you know that part of your program …

Member Avatar for Steve_Jones
0
98
Member Avatar for kalle82

You can not have two radii. A shpereradius and a userradius are confusing. A sphere just has ONE radius, which has to be a private property of you Sphere class.

Member Avatar for ddanbe
0
383
Member Avatar for WhistleTips

There are no dumb questions! Try this: maybe it is a dumb answer :) Do you use the MonoDevelop IDE? >>[COLOR="Green"] to install 7 on parallels[/COLOR] Do you mean Windows 7? I use Boot Camp, which is part of Mac OS X v10.5 and higher and I installed Visual Studio …

Member Avatar for ddanbe
0
140
Member Avatar for badboy11

@CloneXpert: don't use [B]index >= myArrayList.Count[/B] use [B]index > myArrayList.Count[/B] Remember if you have a list with a count of 2, the Indexes go like this: 0, 1 @badboy11 ArrayList can hold any object, but this is perhaps not exactly what you want to do. Take a look at the …

Member Avatar for badboy11
0
172
Member Avatar for reemhatim

If you are taking a course in C#, I should stick to that in the first place.

Member Avatar for reemhatim
0
107
Member Avatar for d87c

You can also search the C# code snippet section. It contains C# code to do a bubble sort.

Member Avatar for mshauny
0
110
Member Avatar for maryarlene

Whatever you enter in a TextBox it is collected as a string.(Using the Text property of the TextBox) So if you want to do your summation, you have to disect textbox1.Text with the SubString method, and transform the substring obtained to a number by using a Parse method.

Member Avatar for Momerath
0
106
Member Avatar for Davenavie
Member Avatar for SALONOY,MANIX
Member Avatar for ddanbe

Hi all, Had a working program with a employee DB in 2008. Opened it in VS 2010 and the conversion wisard was busy doing his thing and asked me for Cristal Reports. A a download beta version was suggested. Any one out there who knows what to do next? Do …

0
65
Member Avatar for tookerello22

If you can't find a final project idea while just learning something, what are you going to do with a much greater project ahead, THE REST OF YOUR LIFE!

Member Avatar for ddanbe
0
114
Member Avatar for buster2209

Line 1: a string litteral is always placed between quotes, so this line should read: [CODE=c#]string str = "12345678901234567890";[/CODE] Line 3 should end in a round bracket [CODE=c#]for (int i = 0; i < 5; i++)[/CODE] Look [url=http://msdn.microsoft.com/en-us/library/system.string.insert.aspxif]here[/url] you want to insert something into a string.

Member Avatar for buster2209
0
103
Member Avatar for nammae

You could also simplify your if-statement. If you know that a number is even, it can never be odd, so you could rewrite your if-statement like this: [CODE=c#]if (number % 2 == 0) type = "even"; else type = "odd";[/CODE] @CloneXpert: Yes, C# is indeed a wonderful language to learn! …

Member Avatar for nammae
0
108
Member Avatar for ejazmusavi

Start simple. Can you draw a line, rectangle a circle on a form? If not, try to do that first.

Member Avatar for kvprajapati
0
450
Member Avatar for rutul

This a bit of an implementation as Ryshad suggested. I used the Queu class here, but List, Stack, or Array class may fit in as well, depending on your needs. [CODE=c#]static void Main(string[] args) { string str = "4+5-3-6+7"; // make two queus which can hold chars Queue<char> NumberQ = …

Member Avatar for mono_jit23
1
1K
Member Avatar for NH1

Has probably to do with [B]public [/B]or [B]private[/B] access modifiers. Check your Global class. Just a remark on the side: It is for several reasons, a bad idea to maintain a class with globals... But please feel free to do whatever you want. At least I'm still rocking in a …

Member Avatar for Lusiphur
0
153
Member Avatar for jackparsana

Use the overloaded - operator to substract 2 DateTime structures. A TimeSpan object is returned. There is also a Substract method.

Member Avatar for ddanbe
0
194
Member Avatar for Jazerix

The integer type only takes whole numbers. If you want real type numbers with a comma, you have to use the float or double types instead of int, to do your calculations.

Member Avatar for Lusiphur
0
357
Member Avatar for kei1412

Don't know if it helps, but perhaps you can let your lexer do some syntax checking too. Look at this snippet for a modest example: [url]http://www.daniweb.com/code/snippet217185.html[/url]

Member Avatar for ddanbe
0
92
Member Avatar for Arnos

Take a look at [url=http://www.daniweb.com/code/snippet217206.html]this snippet[/url], follow the instructions and it displays al the "KnownColors" together with their name. You should also refresh the syntax of the switch-case statement. Read this [url=http://msdn.microsoft.com/en-us/library/06tc147t(VS.80).aspx]this MSDN page[/url] as an example.

Member Avatar for ddanbe
0
162
Member Avatar for ddanbe

Where do I find the System.Numerics namespace, with things like BigInt and Complex? Just installed Visual Studio 2010 Professional. Google did not make me happy:'( Any help, is as always, much appreciated.

Member Avatar for ddanbe
0
98
Member Avatar for lonely_girl
Re: HELP

[QUOTE=lonley_girl]an assignment [/QUOTE] WHICH ASSIGNMENT?????????? [QUOTE=lonley_girl]to make some graphics in C[/QUOTE] WHAT KIND OF GRAPHICS????????????

Member Avatar for Adak
0
256
Member Avatar for emc22

Why do you create a Graphics object of your own? You get one for free out of the [B]PaintEventArgs e[/B] parameter from your pzinter event handler.(line 62)

Member Avatar for emc22
0
91
Member Avatar for [csharp]

Do we talk about bignums here? Look for this [url]http://www.boyet.com/Articles/PiCalculator.html[/url] It is about the calculation of pi, but it contains a C# implemetation of big numbers.

Member Avatar for ddanbe
0
104
Member Avatar for jc1forall

@Nyight : I'm no master either, but please test the code you post! I tested this: [CODE=c#]public static bool isPalindrome(int first, string word, int last) { if (word[first] != word[last]) { return false; } else if (first < last) { return isPalindrome(first + 1, word, last - 1); ; } …

Member Avatar for ddanbe
0
241
Member Avatar for nssltd

The Cursor class does not support any animated cursors(ani files) See [url=http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor.aspx]this article[/url] for more info.

Member Avatar for nssltd
0
138
Member Avatar for zahnsoftware

If you can define your idea as[B] what it does[/B] without the direct need on how it has to be done, use an interface. If you need to have some implementation(how do I do it), use an abstract class.

Member Avatar for embooglement
0
191
Member Avatar for anitha10
Re: C#

@anitha10 As a sidenote, I see you have several threads named C#. Please give your threads a more appropriate name. It will help us all.:)

Member Avatar for taylby
0
105
Member Avatar for Usmaan

Had the same problem once. I worked it out for myself with the aid of some books and the net. What you will need is a scanner, a parser and an engine that drives it all. Look at these snippets, when put together in one project they make up a …

Member Avatar for Geekitygeek
0
198
Member Avatar for ia2196

I hate the word GUI :@ Call it a USER INTERFACE or UI. In the 21st century,IMHO, EVERYTHING is graphic. Else go back a few decades and use [url=http://en.wikipedia.org/wiki/Teletypewriter]this[/url]

Member Avatar for ddanbe
0
100
Member Avatar for agent154

To move up in a directory use the Parent property of DirectoryInfo. [B]DirectoryInfo MyParentDir = MyCurrentDir.Parent;[/B]and then say something like: [B]Console.WriteLine("The parent directory of '{0}' is '{1}'", MyCurrentDir.Name, MyParentDir .Name);[/B]

Member Avatar for Matt Gudmundson
0
301
Member Avatar for BonaDrag

Try this out: [CODE=c#]static void Main() { string str = " 123 Lname Fname"; char[] strToParse = str.ToCharArray(); // convert string to array of chars char ch; int charpos = 0; do //skip whitespace except '\n' { ch = strToParse[charpos]; charpos++; } while (ch != '\n' && char.IsWhiteSpace(ch)); charpos--; //Putback …

Member Avatar for BonaDrag
0
217
Member Avatar for chuck577

Hi kei1412, welcome! You should have posted your question in a new thread. I think you want more something like this: [url]http://www.daniweb.com/forums/forum61.html[/url] Please look up the two other parts in the code snippet section.

Member Avatar for Geekitygeek
1
376
Member Avatar for ddanbe

As all textbooks on C# will tell you, you cannot instantiate an abstract class. I believe the keyword [B]abstract [/B]was intended for that purpose. So can anyone tell me why I can do something like this: [CODE=c#]abstract class TwoDShape { // some code here } class test { static void …

Member Avatar for CloneXpert
0
140
Member Avatar for Stefano Mtangoo

Download the free Visual Studio 2010 Express Edition. It has C# and C++ on board. See if this can be a starting point to learn C#. And NO, I'm not a guy from MS :icon_cheesygrin:

Member Avatar for ddanbe
0
97
Member Avatar for LevyDee

Wonder how you could compile this: [CODE=c#]songs = new string[5];[/CODE] Is the variable [B]songs [/B]defined elsewhere? I should say this has to be: [CODE=c#]string[] songs = new string[5];[/CODE]

Member Avatar for Lusiphur
0
168
Member Avatar for skamranj
Member Avatar for skamranj
0
139
Member Avatar for MaiHunDown

Hi MaiHunDown, welcome here! Rather strange question. What do you mean? A TextBox has a Click or MouseClick event. Do you want to show some info in a textbox after clicking a button?

Member Avatar for hassan12345
0
127

The End.