4,439 Posted Topics
Re: Of course you can, you can even have things like [CODE=c#]public ExampleClass(int a, string b, double c)[/CODE] See also the link Mitja gave you. | |
Re: Line 20: the k variable is also called a temporary used to swap two other variables. | |
Re: Perhaps you want something like this: [CODE=c#]class Program { static void Main(string[] args) { int max = 0; int[] Numbers = { 2, 158, 33, 42, 38, 1001, 3 }; max = Max(Numbers); Console.WriteLine("An maximum of the numbers is {0}", max); Console.ReadLine(); } static int Max(int[] N) { int maximum … | |
Re: Please follow the advise of adatapost :) Don't start to run, before you can walk. | |
Re: I believe it is called a side bar or icon bar. Hope it helps. | |
Re: Some code fragments from you would be helpfull in solving your question. Remember: select your code and surround it with code tags. | |
Re: Read [url=http://channel9.msdn.com/Forums/TechOff/58729-Why-are-string-types-immutable-in-C]this[/url] and you know why. | |
Re: If I am right that [COLOR="Green"]totaltargettxtbx[/COLOR] is referring to a TextBox instance, then you cannot convert it to an integer. Use totaltargettxtbx.Text instead. | |
Re: Just one question Teme64. Would it not be better "to scroll around the pictures" with the Forward or Back buttons (setting the index when appropriate), or would that be just a matter of "taste"? | |
Re: At each iteration in your for loop you are adding a number to [COLOR="Green"]Number[/COLOR]. Afterwards you test if it is zero to break the loop. This will not always happen. | |
Re: Perhaps have a look at this snippet also : [url]http://www.daniweb.com/code/snippet217212.html[/url] | |
Re: You defined a color named redColor as being [COLOR="Red"]Black[/COLOR]? Next you define a new rectangle But you are not drawing anything! Use code like this:[url]http://msdn.microsoft.com/en-us/library/aa287521(VS.71).aspx[/url] or use the Paint event, it gives you a Graphics object for free via PaintEventArgs | |
Re: Store your input in an Array, or better yet a generic List. | |
Re: Please use code tags if you post code. Throwing in some if-statements may help: [CODE=C#]Console.WriteLine("--------------------------------------"); //Display lines for (int i = 1; i <= Height; i++) { //Display columns for (int j = 1; j <= Width; j++) { if (i == 1 || i == Height) Console.Write("*"); else if … | |
Re: Use an array of strings. Select a random index into your string array with the Random class. See for example here on how to use this class: [url]http://msdn.microsoft.com/en-us/library/system.random.aspx[/url] | |
Re: This is a major issue which dates from long ago. One answer: it does not matter really! See for instance [url=http://en.wikipedia.org/wiki/Hungarian_notation]this[/url] I (but this is just my style!) often use a c in front of a constant. Or I use things like OKbtn for a Button, Salarytxb for a TextBox. … | |
Re: Don't know what a HIQ puzzle is, but I would not implement it as a Console application. I would use a Windows Forms Application instead. Suggest you read a book about C# :) | |
Re: Sigh, this seems to be a never ending story... Look (among others) at this [url]http://www.daniweb.com/forums/thread236306.html[/url] Or this [url]http://www.daniweb.com/forums/thread316394-2.html[/url] | |
Re: Perhaps you could override the checkboxclass. This snippet: [url]http://www.daniweb.com/code/snippet217338.html[/url] will help you on the way. | |
Re: Perhaps you could work out [url=http://www.daniweb.com/code/snippet217265.html]this snippet[/url] to your needs. | |
Re: Well, think about this: 20 and 36 are not powers of 2. | |
Re: If your enum only has relevance for a particular class, leave it inside that class. But most of the time enums have the tendency to be of a more general nature ( my experience ) so I think defining them outside a class is the way to go. | |
Re: Use the StartWith method of the string class. Perhaps something like this? [CODE=C#]class Program { static void Main(string[] args) { string[] test = {"one@test.com","@test.com","@contoso.com"}; // your string // make a new list of strings to contain all the strings + all the modifications List<string> changetest = new List<string>(); // print … | |
Re: Don't really get it. Do you want to use a textbox as some sort of console? If you want to extract some strings from a string object, you could use the methods Split or SubString. | |
Re: If you don't know what you are doing, considering what you already did, you are in big trouble. | |
Re: Go to [B]Tools [/B]menu select [B]Options [/B]and choose [B]TextEditor[/B] you will find what you want. | |
Re: There is always [url=http://www.amazon.co.uk/Programming-Windows-Three-Dimensional-Presentation-Foundation/dp/0735623945/ref=sr_1_1?s=books&ie=UTF8&qid=1289414971&sr=1-1]this book by Petzold[/url] It uses WPF(Windows Presentation Foundation) But believe me, you got to have a strong heart, to grasp what quaternions really are :) | |
Re: Look here: [url]http://msdn.microsoft.com/en-us/library/f02979c7.aspx[/url] | |
Re: Did you perhaps move some files to another directory? | |
Re: What do you mean by "any"? Did you mean "some"? And if so, which problems? | |
Re: What I can make up out of your explanations, is that you need some sort of MDI interface. For a Starter look here: [url]http://msdn.microsoft.com/en-us/library/ms644908(VS.85).aspx[/url] | |
Re: Line 1 : You don't have to cast char.MaxValue to an int. Besides that you can index your string s directly., but before you do that use the ToUpper or ToLower methods of your string object. | |
Re: Are you hoping someone else is going to do your homework? Read the rules! Please... | |
Re: Perhaps have a look at this snippet: [url]http://www.daniweb.com/code/snippet238279.html[/url] | |
Re: [QUOTE=cwarn23]Anyways back on topic atlantis must be out there somewhere.[/QUOTE] [B]Must [/B]be out there? Wishful thinking? | |
| |
Re: Perhaps a look at [url=http://www.daniweb.com/forums/thread224213.html]this thread[/url] could help you out. | |
Re: You could use: [CODE=c#]Button[,] TwoDbuttonMatrix = new Button[5,5];[/CODE] Don't forget to create a new button in this 2D array of buttons! Succes! | |
Re: LetterGrade is a local String variable of your Click method. It is undefined as far as I can see. You are using it in a switch statement and testing on characters. A string is of type string, this is not equal to a char type. | |
Re: There is indeed much need for things like this! Very well explained also. Keep up the good work. ;) | |
Re: Why don't you guys take the effort to do a little search here? This is just a thread from 3 days ago; [url]http://www.daniweb.com/forums/thread318179.html[/url] | |
Re: The snippet of Ryshad is very good! Yet another snippet out of the snippet section is [url=http://www.daniweb.com/code/snippet217193.html]this one[/url] | |
Re: Many books out there : [url=http://www.amazon.co.uk/Algorithms-Parts-1-5-Bundle-Fundamentals/dp/0201756080/ref=sr_1_4?s=books&ie=UTF8&qid=1287769776&sr=1-4]an example[/url] | |
Re: [B]if((numGrade>87) && (numGrade>101))[/B]Look carefully at this statement from line 36. This will only be true if numGrade is > 102! Hope this helps. | |
Re: [QUOTE]X and Y are float type, the Y is an integer.[/QUOTE] What is Z? Float? | |
Re: public string studentId { get; set; } is just a no nonsence syntax for difining a property. If you want to check some values first use the "normal" syntax. | |
Re: Hi requimrar, welcome here! Line 31 of your code: Don't go to a label, call your ShutDown method here. A [B]goto [/B]is something that is rarely needed in modern programming. |
The End.