RasSubEntry Class

DotRas SDK

Collapse image Expand Image Copy image CopyHover image
Represents a subentry of a remote access service (RAS) entry. This class cannot be inherited.

Namespace: DotRas
Assembly: DotRas (in DotRas.dll) Version: 1.3.5166.33435 (1.3.0.0)

Syntax

C#
public sealed class RasSubEntry : MarshalByRefObject, 
	ICloneable
Visual Basic
Public NotInheritable Class RasSubEntry
	Inherits MarshalByRefObject
	Implements ICloneable
Visual C++
public ref class RasSubEntry sealed : public MarshalByRefObject, 
	ICloneable
F#
[<SealedAttribute>]
type RasSubEntry =  
    class
        inherit MarshalByRefObject
        interface ICloneable
    end

Examples

The following example shows how to create a multilink dial-up entry and add it to a phone book.
C# Copy imageCopy
using (RasPhoneBook pbk = new RasPhoneBook())
{
    pbk.Open();
    RasEntry entry = RasEntry.CreateDialUpEntry("Dial-Up Connection", "555-111-1234", RasDevice.GetDeviceByName("Internal Modem", RasDeviceType.Modem));
    if (entry != null)
    {
        entry.DialMode = RasDialMode.DialAll;
        entry.SubEntries.Add(new RasSubEntry() { PhoneNumber = "555-111-2345", Device = RasDevice.GetDeviceByName("Interal Modem #2", RasDeviceType.Modem) });
        pbk.Entries.Add(entry);
    }
}
Visual Basic Copy imageCopy
Dim pbk As New RasPhoneBook
pbk.Open()
Dim entry As RasEntry = RasEntry.CreateDialUpEntry("Dial-Up Connection", "555-111-1234", RasDevice.GetDeviceByName("Internal Modem", RasDeviceType.Modem))
If entry IsNot Nothing Then
    entry.DialMode = RasDialMode.DialAll
    Dim subentry As New RasSubEntry
    subentry.PhoneNumber = "555-111-2345"
    subentry.Device = RasDevice.GetDeviceByName("Internal Modem #2", RasDeviceType.Modem)
    entry.SubEntries.Add(subentry)
    pbk.Entries.Add(entry)
End If

Inheritance Hierarchy

System..::..Object
  System..::..MarshalByRefObject
    DotRas..::..RasSubEntry

See Also