4,439 Posted Topics
Re: Or you could drop your data in a DataGridView and use some of the many properties and methods of this rather big, but very usefull object. [See this example.](http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.sortedcolumn.aspx) | |
Re: If you are using Visual Studio, you could drag a TextBow in a Forms application. See in the generated files how VS does it and act accordingly. | |
Re: For all I know, leave IT and start a candy shop! In the other case, do your homework and ask a question if you get stuck with it. We will be ever so happy to give you any help :o) | |
Re: A **double** has a precision of 15-16 digits. Look up the article in say MSDN. | |
Re: Why not learn something about division ande remainder operators in C#? [Learn!](http://msdn.microsoft.com/en-US/library/ms173145(v=VS.100).aspx) | |
Re: This seems to mean that DataRecords is somehow empty and so doc.Elements is probably empty also. Did you check that? | |
Re: In searching the web about list sorting, I stumbled upon [this masterpiece!](http://weblogs.asp.net/kiyoshi/archive/2009/02/17/render-aspx-page-as-string.aspx) | |
Re: Indeed Reverend Jim, the fact that he came with a steamboat from Spain with oranges and Zwarte Piet, was "invented" in the Netherlands! The fact that Santa Claus wears his typical red-white suit, comes from [Coca-Cola advertising](http://www.coca-colacompany.com/stories/coke-lore-santa-claus) in the beginning of the previous century. | |
Re: I don't know, but I do know the *this* keyword of C# is a feature C# took over from Java. Just like C# took over lot of syntax from the C programming language family. | |
Re: The .NET framework is already rich enough in datastructures to serve all your basic programming needs. Learn from it through MSDN. If you can't find what you want, you could start thinking about your own datastructures. Plenty of stuff on the web. This is an [example.](http://www.codeproject.com/Articles/16337/Back-to-Basics-Generic-Data-Structures-and-Algorit) | |
Re: You probably have some Data file to read from. Read it line by line in a loop. If you put in the data manually,[this](http://www.daniweb.com/software-development/csharp/code/371819/code-template-for-a-menu-in-a-console-application) might help. | |
Re: Why on earth do you think I should do your homework? What have you tried for yourself and what problems have you encountered? Post a question about that and we will try to solve it. *(Think I'm gonna make a template of the above text . . .)* | |
Re: Can we have code for GetPrecipitationPeriod? Line 6 will only recieve line 5, not line 4. | |
Re: The Console class also has a [SetCursorPosition method](http://msdn.microsoft.com/en-us/library/system.console.setcursorposition(v=vs.90).aspx) | |
Re: A form doesn't close by itself. Could you send your code with the eventhandler of the button? | |
Re: This is a [code snippet](http://www.daniweb.com/software-development/csharp/code/364073/how-to-set-up-a-modal-dialog-form) I posted some time ago. I hope it can help. | |
Re: You could write your property starting on line 40 in one line. It is called an auto-implemented property. It goes like this: **public int counter { get; set; }** Don't know exactly what your problem is, could you tell us a bit more? | |
Re: It always defaults to the default background color of a control. | |
Re: In my country(Belgium) the colors purple and black are related to mourning. So I agree with with A.D. : put in some polka dots! :) ![]() | |
Re: MSDN is a great resource to get started. In [this article](http://msdn.microsoft.com/en-us/library/aa288453(VS.71).aspx) you will find info on how to convert your DEPTS array on line 8 into a legitimate C# line. Success! | |
![]() | Re: What about a [Backgroundworker](http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker(v=vs.95).aspx)? |
Re: Your code is structured very bad. Where is Main? At least I (perhaps some more clever folks around here?) cannot figure out what you really want, with the code you gave. | |
| |
Re: It are all just numbers and their representation. There is really nothing more to it. What about 101010 in binary? 10 october 2010? Or the well known number 42 (decimal) from [The Hitchhiker's Guide to the Galaxy](http://en.wikipedia.org/wiki/42_(number))? | |
Re: Well, [this](http://www.daniweb.com/software-development/csharp/code/231400/chasing-lights-running-ants) is perhaps not exactly what you want to achieve, but it might give you some ideas. | |
Re: Put a transparent form over your existing form. Select a region in the transparent form by handling some mousedown and mousemove and mouseup events. Handle this region in your original form and remove the transparant one. I had a project once that did that, if I can find it I … | |
Re: Where in your code you are using aDateTime? Please rephrase your question. | |
Re: Perhaps write your own conversion functions and see if they are better? | |
Re: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication6 { class Program { static void Main(string[] args) { double[] MyArray = new double[]{10,9,5,77,45,23,12,5,88,49}; double wrecked = MyArray.Average(); int lowerthanAv = 0, higherthanAv = 0; for (int i = 0; i < MyArray.Length; i++) { if (MyArray[i] < wrecked) lowerthanAv++; … | |
Re: Perhaps learning **regular expressions** or **LINQ** can help. | |
Re: Imin=2 Imax=5 TotalNrs=Imax-Imin+1 Sum=TotalNrs*(Imin+Imax)/2 | |
LINQ is a great extension to the C# language! But it can be terrifying at first. So here is a little snippet just to get your feet wet. You would normally use some sort of looping here. See how easy it is to get some values from an array. Enjoy | |
Re: Hi Galhajaj, welcome at daniweb :) Your problem is you defined an array to make place for 8x8 squares, but you did not define the square objects. Look: [CODE=c#]public partial class Form1 : Form { Square[,] square = new Square[8, 8]; public Form1() { InitializeComponent(); int i, j; for (i … | |
Re: Your question is not very clear to me. Is the barcode 41/3/100 saved in its totality or did you just saved 100 in the DB? Which button do you click? Please clarify. The string class has a method called SubString. | |
Re: This boils down to: I'm a male person. I want to continue my life with a woman partner, but I cannot find one. Please provide me one. There are some things in your life you got to do for yourself! | |
Re: I use the Home Planet program from here [url]http://www.fourmilab.ch/homeplanet/[/url] wich shows what you want. (It is free) You can download the source code in C. | |
Re: Hi Mohammad, welcome. Please elaborate on your question. Do you use Visual Studio? I'm inferring you use C#, is this correct? Do you know what ADO.NET is? | |
Re: Hi keyd! Welcome here. Have you had a look at [this](http://www.daniweb.com/software-development/csharp/threads/437362/getting-started-with-c-the-list)? | |
Re: Have a look at [this](http://www.daniweb.com/software-development/csharp/threads/437362/getting-started-with-c-the-list) | |
Re: Indeed, weathernews is nowhere defined in your code. In this case(No pun intended) you are better off with an if elsif statement I guess. Happy programming! | |
Re: Have a look [here](http://msdn.microsoft.com/en-us/library/w2sa9yss.aspx). | |
Re: If you select a Form.cs file (the one above the Form.Designer.cs file) you should see appear a small square button in the solution explorer. If you hover over it it says: "View Designer" | |
Re: You are adding 5 times the number 5 which adds up perfectly to 25.(See Momerath) Computing machines are very dumb, the only do what you ask them to do. :) | |
Re: Have a look in the code snippet section. Something like [this](http://www.daniweb.com/software-development/csharp/code/217193/passing-data-between-forms) | |
Re: Why are you mixing a Forms application with a Console application? And most important where or what is the error? | |
Re: I think the long startup time has to do with the fact that all the resources for all the languages have to be loaded in some way.If you do most of your programming in C++ and never have any plans to program in say F#, you should be able to … | |
For anyone who likes to do something with sets in C#, this can be a starting point. The full project (VS 2010) is also included. Have fun with programming! | |
Re: Do not understand "year 12" very well. Does it mean you are 12 years old or (starting school at 6), 18 years old? Both of your proposals look good to give it a try. | |
Re: Make use of the [HashSet collection class](http://msdn.microsoft.com/en-us/library/bb359438.aspx) |
The End.