•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C# section within the Software Development category of DaniWeb, a massive community of 403,589 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,116 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C# advertiser: Programming Forums
•
•
•
•
•
•
•
•
C# has two types of strings, one is immutable and the other, the class StringBuilder, is mutable (dynamic). I just wanted to hang a short code snippet out there to show you some of the typical operations. (View Snippet)
A short C# code snippet to get the US Naval Observatory Master Clock Time from:
http://tycho.usno.navy.mil/cgi-bin/timer.pl
The snippet displays the raw HTML code with the time infomation and then extracts one specific US time zone. (View Snippet)
The xor operator allows you to switch the values of two integer variables without the need for a third, temporary variable. (View Snippet)
I am afraid, I am starting to like C#, despite the somewhat bloated .Net Framework requirements. Mister Bill's Microsoft is very supportive though. The language has a nice flow compared to GUI programming in C++. Here we are looking at a standard ListBox, add some items, sort them and select... (View Snippet)
Demonstrates how to disable the close button in C#. (View Snippet)
The following is a simple painting program. It uses Windows Forms and will allow you to draw whatever you want.
You can also include code to change the colour or size of the brush via a right click menu by using code such as this:
MenuItem mi = new MenuItem("Option");
... (View Snippet)
This code shows how to use a minimum Windows Gui program to display the results of a bubble sort of an integer array. (View Snippet)
It's spring break, so let's beep in C# code, actually a 440 Hz A. We are just borrowing the Beep() function from the Windows kernel. (View Snippet)
Here I made a GUI template with a Form, Button and Listbox using MS VCS 2003. MS VCS 2003 still produces a single file usable as a templet, whereas MS VCS 2005 smears files all over the map. Must be some marketing persons idea of market dominance.
I took the source file, removed all the usual... (View Snippet)
I followed Lardmeister's smart hints about creating templates with VC# 2003 and using SnippetCompiler.exe to write and test the rest of the program. It also allows you to build the executable (only 7k in size). The algorithm is from one of my Python snippets I wrote a long time ago. It only took... (View Snippet)