4,439 Posted Topics
Re: How would you figure out what year 89 stands for? 89 BC? 1689? 3089? Well the method that does the string conversion can't either. So the best the method can come up with is is to use two zeros. Hence 0089 if you initialise the year of a date with … | |
Re: Hi, varunne, welcome at Daniweb :) [url=http://www.daniweb.com/software-development/csharp/code/270748]This snippet[/url] may give you an idea. | |
Re: You don't have to use [B]DateTime.Now.ToShortDateString().ToString();[/B] use [B]DateTime.Now.ToShortDateString();[/B] And for your problem use :[B] DateTime.Now.ToString("dd-MM-yyyy");[/B] | |
Re: You want to print a table with the powers of 2 and you want your integers to be signed and unsigned. You're making it to complicated I think, use [B]\t[/B] to separate your output. Or use something like printf("|%d |%u |",x,y); | |
Re: Can something like [url=http://stackoverflow.com/questions/6173946/how-to-add-datagridview-elments-into-a-table-in-sql-server-database]this[/url] do the trick? | |
Re: Maybe you can find some ideas here: [url]http://www.daniweb.com/software-development/csharp/code/217185[/url] | |
Re: Hi tontano, welcome :) You could probably use some ideas from [url=http://www.daniweb.com/software-development/csharp/code/217265as]this snippet[/url] as well. | |
![]() | Re: [url]http://msdn.microsoft.com/en-us/library/2a723cdk.aspx[/url] [url]http://msdn.microsoft.com/en-us/library/6373h346.aspx[/url] ![]() |
Re: You could store your settings in the application resources and read them back in. You could do some Serialization. One question : check your if statement. What if all 3 checkboxes are checked? If that is not the behaviour you want, use radiobuttons instead. | |
Re: Search for fuzzy logic in C# on the web. Example: [url]http://www.codeproject.com/Articles/4667/Fuzzy-Logic-Dot-Net[/url] | |
Re: I have a copy of [B]Pro LINQ: Language Integrated Query in C# 2008 by Joseph C. Rattz, Jr.[/B] You also have [B]LINQ Pocket Reference (Pocket Reference (O'Reilly)) [/B] | |
Re: db is a variable, not a type. You can have a Table of DataClassesDataContext, not a Table of db. | |
Re: If you say a post is good or bad, you always have to why. The poster of the post can probably find ways to improve himself with the comments given. | |
While surfing the web I got to this site: [url]http://en.wikipedia.org/wiki/Fourier_series[/url] “Hey, I why not write something like this in C#!” The rather scary looking formulas did not withhold me to start coding (see below Fig. 1 and Fig. 2) The formula from Fig. 2 is hidden under one of the … | |
Re: You can read this on Google:[url]http://books.google.be/books/about/C_network_programming.html?id=mHT-_P_jKQcC&redir_esc=y[/url] but I still think it is better to buy one and have it handy at your side. | |
Re: [QUOTE]System.Object ToString() method defined as abstract method [/QUOTE] Incorrect information, read this:[url]http://msdn.microsoft.com/en-us/library/system.object.tostring.aspx[/url] | |
Re: On line 16 userTotal should start with being 0, not 1. On line 17 Percentage will always equal 100. Can you use arrays? | |
Re: Maybe this might also help:[url]http://www.daniweb.com/software-development/csharp/code/371819[/url] | |
Re: Perhaps this will help you out: [CODE=C#]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Enumtest { class Program { public enum KortVerdi { To = 2, Tre = 3, Fire = 4, Fem = 5, Seks = 6, Sju = 7, Åtte = 8, Ni = 9, Ti = … | |
Re: [B]return [/B]may be used in void methods, but may as well be omitted. [CODE=C#]public void TestMethod() { MessageBox.Show("This is a void method that shows a message and returns nothing"); return; // may be omitted } // use: TestMethod();// will show a message[/CODE] | |
Re: The methods you mention are or can come from the StreamReader class. Look them up to see what they do on MSDN [url=http://msdn.microsoft.com/en-us/library/system.io.streamreader.aspx]here[/url] | |
Re: Send an email to Telerik with your question. I believe they are in a better position to answer it. | |
Re: Your code seems to be all messed up. You got to use an Array or better a List to store your inputted numbers Write an input loop for that. Then loop trough your array or list and sum all the numbers. | |
Re: Why do you use CreatGraphics on line 56 of your code? The PaintEventArgs parameter of your paint handler gives you one for free! It is called [B]e.Graphics[/B]. | |
Re: On a screen the x coordinate moves from left to right. The y coordinate moves from top to bottom, so you could say it is rotated by 180° | |
Re: Seems to me like you are an absolute novice. Can you do the following: Start a forms app. In the designer put a button and a label on the form. Let the label show "Hello world!" after a click on the button. Success! | |
Re: Other MSDN items that may clarify some things: [url]http://msdn.microsoft.com/en-us/library/ms173149(v=VS.80).aspx[/url] [url]http://msdn.microsoft.com/en-us/library/ms173156(v=vs.80).aspx[/url] [url]http://msdn.microsoft.com/en-us/library/cc713620.aspx[/url] | |
Re: When you use the short version[CODE=C#] public int MyVar { get; set; }[/CODE] The C# compiler is smart enough to work this syntax out to the full version. With a sectretly generated field variable. You use it for simple properties like [B]color [/B]etc. You just have to set or get … | |
Re: What is the size of your exe file? What are your compter specs? How many other apps are up and running? | |
Re: When printing , somehow you get something like System.Drawing.Printing.PrintPageEventArgs e This e parameter has a Graphics object. Draw lines in it and draw the text of your TextBoxes in it. It is just like drawing in a form, but instead the drawing will appear on printer paper. Success :) | |
Re: Hmmm, I wonder ... So if I have a textfile consisting of 26 characters, the alphabet for example, I could reduce its size by 97% of 26, being 25.22??? So I could zip all the information of the alphabet in less than 1 char? | |
Re: In such situations you better handle it completely programaticaly. The same situationarrises if you want to handle 100 or more buttons via the designer... See how 1 Panel is handled in code (designer.cs file etc.) Copy that code and make an array or List of Panels and set all the … | |
Re: To avoid validation and problems with it, it is better to use a DateTimePicker on a form, to fill in a date. | |
Short snippet on how you could remove all occurrences of a char from a string using LINQ. | |
Re: If you know WPF, I think it can be done relatively easy. | |
Re: Here are two snippets, I posted here, that may be adapted to your specific needs. [url]http://www.daniweb.com/software-development/csharp/code/217265[/url] [url]http://www.daniweb.com/software-development/csharp/code/217310[/url] | |
Re: Hi Sachin, welcome on DaniWeb. Be it Java or C#, do it in the language you feel most comfortable with. For me this would be C# :) Google speech or voice recognition: lots of things out there. | |
Re: Why do you giv 3 threads with different subjects the same name? | |
Re: You could use any texteditor like Word or WordPad. But I think most people use Visual Studio. I do. :) | |
Re: The code editor in Visual Studio is a marvelous thing, but it is not a text processor like Word. | |
Re: This is how I defined the multiply operator in my complex struct: [CODE=C#] /// <summary> /// Complex multiplication operator facilitates multiplication of two complex numbers. /// Note that overriding this operator automatically overrides the *= operator as well. /// </summary> /// <param name="a"></param> /// <param name="b"></param> /// <returns></returns> public static … | |
Re: Your abc click handler would loo something like [CODE=C#]private void abc_Click(object sender, EventArgs e) { //code here }[/CODE] Now sender.Name will give you something like "bij"(so extract the i and j from there), you could also use the Location property in this case or the Tag property, to do what … | |
Re: This is easy in WPF, but then again WPF is a hard nut to crack. | |
Re: Daniweb has a search function, I typed [B]C# sending data between forms[/B] clicked the serch button and got lots of answers. You will surely find what you are looking for. | |
Re: Daniweb has a search function, I typed [B]C# sending data between forms[/B] clicked the serch button and got lots of answers. You will surely find what you are looking for. | |
Re: This seems rather simple. C is written in an English like syntax. If you want to talk and write C code, use the syntax etc. Chinese is written in a Chinese like syntax. If you want to talk and write Chinese, use the syntax etc. Never heard of a person … | |
Re: If you are more used to Pascal type programing languages you could speak of procedures or subroutines. Meaning functionality done without returning a value. A function normally always returns a value. So in C-like languages [B]void [/B]is used to handle this. ArrayList is a list of any object you like. … | |
Re: THanks for the info Momerath, but if there were any upgrades to C#, would they not have mentioned it separately? | |
When you want to draw something on a form you need a Graphics object. But a Graphics constructor isn’t public and if that is not enough the Graphics class is also sealed! This means you can’t create a Graphics object via the new keyword nor can you derive from the … |
The End.