DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomServer Class / Dispose Method
Example

In This Topic
    Dispose Method (DicomServer)
    In This Topic
    Release all system resources used by DicomServer object
    Syntax
    'Declaration
     
    
    Public Overridable Sub Dispose() 
    public virtual void Dispose()
    Remarks
    This is the Destructor method.
    Example
    DicomServer server = new DicomServer();
                
    // Handle incoming DICOM association requests
    server.AssociationRequest += (sender, e) =>
    {
        Console.WriteLine($"Incoming DICOM association request from {e.Association.CallingAET}");
    };
                
    server.Listen(104);
    server.Dispose();
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also