using SpiceSharp.Components;
using SpiceSharp.Simulations;
namespace SpiceSimulation
static void Main(string[] args)
new VoltageSource("V1", "in", "0", 0.0),
new Resistor("R1", "in", "out", 1.0e3),
new Resistor("R2", "out", "0", 2.0e3)
var dc = new DC("dc", "V1", 0.0, 5.0, 0.001);
dc.ExportSimulationData += (sender, exportDataEventArgs) =>
Console.WriteLine(exportDataEventArgs.GetVoltage("out"));