Example #1
0
        private static void WriteInput(List <VLSM.Branch> listBranches, VLSM.IPv4 rootIP)
        {
            Guides = "";


            Guides += $"Root IP: {rootIP.ToDecimalString()}/{rootIP.Suffix}{Environment.NewLine}";
            Guides += $"Branch";
            Guides += branchesAmount <= 1 ? $": {Environment.NewLine}" :$"es (sorted descendant by hosts amount): {Environment.NewLine}";


            foreach (Branch brch in listBranches)
            {
                Guides += $"{brch.Name}:{brch.HostsAmount}{Environment.NewLine}";
            }


            Guides += Environment.NewLine;
            Guides += Environment.NewLine;


            Guides += $"Using the \"AND BIT\" operator foreach bit couple of the subnet mask & root IP:{Environment.NewLine}";
            Guides += $"Subnet mask: {rootIP.SubnetMask.ToBinaryString()}{Environment.NewLine}";
            Guides += $@"          Root IP: {rootIP.ToBinaryString()}{Environment.NewLine}";
            Guides += $@"  Net address: {rootIP.NetAddress.ToBinaryString()} ({rootIP.NetAddress.ToDecimalString()}/{rootIP.Suffix}){Environment.NewLine}";
        }