Before understanding how neurons and the neural networks work, let us revisit the structure of a neural network. As you know a neural network consists of several layers, and each layer has a number of neurons in it. Neurons are one layer is connected to multiple or all neurons in the next layer. Input is fed to the neurons in the input layer, and output is obtained from the neurons in the last layer.
A Fully Connected 4-4-2 neural network with 4 neurons in the input layer, 4 neurons in the hidden layer and 2 neurons in the output layer.
For implementing it in C#, refer the following link:
https://www.tech-quantum.com/implement-a-simple-neural-network-in-csharp-net-part-1/