C# Code Snippets Readonly

C# Readonly

In thisĀ code snippet,Ā we will take a look at the readonly keyword in C#. Obviously, a variable/field marked as readonly can not be modified after it was set. However, readonly can be set at run time in the constructorĀ or when it’s declared(at compile time)Ā unlikeĀ constĀ which can only be set at compile

C# Code Snippets Ranges

C# Ranges

In thisĀ code snippet, we will take a look at ranges in C#. Ranges give you a quick and easy syntax to get a range/interval of elements from a collection. For example, if an array has 10 elements you can specify a range from the 2nd to the 5th element and that slice of the array will be returned to you.

C# Code Snippets DateTime

C# DateTime

In thisĀ code snippet, we will take a look at DateTime in C#. DateTime is used to represent dates and times in code. TheĀ DateTime class contains many useful methods to manipulate the date(formatting the date, adding/subtracting years, months, days, hours, …).Ā Let’s have a look at the code below to see how to use DateTime.

iCE40 FPGA iCE aStick with IceStorm Tutorial

Lattice iCE40 FPGA IceStormĀ Tutorial

This tutorial will cover the hardware and software setup for the icestick development board that uses an iCE40 FPGA. The IceStorm open source toolchain will be used for programming the board instead of the vendor tools. For the demonstration, we’ll make a simple binary counter that will display its value with the onboard LEDs. The logic design will be defined/coded with Verilog.