Posts Tagged "C#"

Avoid Tying Classes to Your Forms

So you have a great class written and you want to integrate it into your project. Whether it be C#, Java, VB even C++ you may have asked yourself "How do I go about getting my class to update my form controls?" or "How do I get the class to change something on my interface or another class?" It is a common question asked on the board and the answer ...

Threads, ProgressBar, and File Processing in C#

We have had a few questions on the board in recent times asking about the best way to show the progress of a long running process; such as file reading of a HUGE file. If you have a file with tens or hundreds of thousands of lines, or datasets which may have millions of records, it is going to take some time to process. It is fine that it takes ...

Find High / Low Value in Array (Definitive Series)

Welcome to another kick ass entry of the Programming Underground. On today's entry we explore a basic way to find the high and low values in an array as part of our Definitive Series. For those of you who are not familiar with my Definitive Series, it is the exploration of a concept and examples provided for 5 major languages (C++/C#/VB.NET/Java/PHP). Doing a search on my blog will also uncover ...

Playing with a ToolStrip Control in C#

Ready for another action packed, fun thrilled entry? In this episode we talk about the Toolstrip control and creating one dynamically through code. Sure we can add one through the toolbox and configure it at design time, but knowing how to create controls and manipulate them at runtime is also great practice. You might be asked many times to create a control and then have it update its appearance as ...

Euclidean, Bezout, and Coprime Oh My!

Occasionally a programmer loves to play with numbers. Some like to stick gum in their sister's hair, but that is besides the point. At the heart of some programming is the heart of mathematics and especially number theory. One of the great theoretical algorithms out there is the Extended Euclidean algorithm which is used to find the Greatest Common Divisor (GCD). The GCD is a number which divides both of ...

BozoSort Definitive (C++, C#, VB.NET, Java, PHP)

WARNING: PLEASE USE WITH EXTREME CAUTION! CONTENTS MAY BE FUNNY BUT NOT FOR PRODUCTION USE. Programmer Discretion is Advised! Hey you bozos out there, now there is a sort even for you! For those who don't know, a Bozo Sort is a joke sorting algorithm that actually sorts but at horrible timing and is very inefficient. It is good to see it at work from a theoretical stand point but it ...