troubleshooting Question

VB.NET - Refactor Class per SOLID principles

Avatar of CipherIS
CipherISFlag for United States of America asked on
C#Visual Basic.NET* SOLID
2 Comments1 Solution298 ViewsLast Modified:
Working on a project and the .NET application contained IP's all over the code.  I created a class to put them in one spot based on SOLID.  Looking at the below class can this be refactored?  Should I create an Interface then a class that inherits that Interface and a class for each IP?
Namespace Properties
    Module IPAddress

        Private _ProdIP As String = "1.2.3.4"
        Public ReadOnly Property ProdIP() As String
            Get
                Return _ProdIP
            End Get
        End Property

        Private _TestIP As String = "2.3.4.5"
        Public ReadOnly Property TestIP() As String
            Get
                Return _TestIP
            End Get
        End Property

        Private _QAIP As String = "3.4.5.6"
        Public ReadOnly Property QAIP() As String
            Get
                Return _QAIP
            End Get
        End Property

    End Module
End Namespace
ASKER CERTIFIED SOLUTION
Subrat (C++ windows/Linux)
Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros