From 5d366ea2cfdf69416cf4704da9cccbd2ba3dc8a9 Mon Sep 17 00:00:00 2001 From: Tim Young Date: Fri, 16 Mar 2018 13:57:10 -0500 Subject: [PATCH] Add Equals func for NB_IPaddress --- EduNetworkBuilder/IPAddress.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/EduNetworkBuilder/IPAddress.cs b/EduNetworkBuilder/IPAddress.cs index 0d03b8c..638bdc9 100644 --- a/EduNetworkBuilder/IPAddress.cs +++ b/EduNetworkBuilder/IPAddress.cs @@ -65,6 +65,15 @@ namespace EduNetworkBuilder } } + public bool Equals(NB_IPAddress CompareWith) + { + if (_ip != CompareWith._ip) return false; + if (_mask != CompareWith._mask) return false; + if (_gw != CompareWith._gw) return false; + if (myType != CompareWith.myType) return false; + return true; + } + public void Save(XmlWriter writer, string tag) { writer.WriteStartElement(tag);