public void ShowDetails(Neuron neuron) { this.Show(); this.BringToFront(); this.m_neuron = neuron; lbType.Text = "Type: " + m_neuron.GetType().Name; lbInputs.Text = "Inputs: " + neuron.InputsCount; lbOutput.Text = "Last output: " + neuron.Output; if (neuron is ActivationNeuron) { lbFunction.Text = "Function: " + (m_neuron as ActivationNeuron).ActivationFunction.GetType().Name; lbThreshold.Text = "Threshold: " + (m_neuron as ActivationNeuron).Threshold; } }