Skip to main content

Load / save in C#

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="NetworkLoadSave.cs" company="Bayes Server">
// Copyright (C) Bayes Server. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace BayesServer.HelpSamples
{
using System.IO;

public static class NetworkLoadSaveExample
{
public static void Main()
{
var fileName = "filename.bayes"; // replace this with your path

// Load a network...

var network = new Network();

network.Load(fileName); // You can also load a network from a Stream or a string.

// Save a network

network.Save(fileName); // You can also save a network to a Stream or to a string.

}
}
}