Pages
-
Recent Posts
Archives
Tag Archives: dotnet
Automatically Fill a ComboBox with an Enum
This is a really nice little feature. If we have an enumerator, say: public enum MyEnumerator { Oranges, Apples, Hedgehogs, Laptops, Budgies, Other } Having a form with a ComboBox called comboBox1, put this in the constructor/form load etc: this.comboBox1.DataSource … Continue reading
Making sure a number is between 0 and 255
Recently while reworking the code for the Ascgen dotNET I needed to make sure that a variable is between 0 and 255 before converting it to a byte, and I needed it to be as fast as possible since it … Continue reading
Posted in .net, C#, Programming
Tagged .NET, between, bitwise_operations, byte, C#, dotnet, limit, math, max, min, number, pixel, Programming, Theory
Leave a comment