C# Uri UriSchemeFtp

Description

Uri UriSchemeFtp specifies that the URI is accessed through the File Transfer Protocol (FTP). This field is read-only.

Syntax

Uri.UriSchemeFtp has the following syntax.


public static readonly string UriSchemeFtp

Example

The following example creates a Uri instance and determines whether the scheme is UriSchemeFtp.


//from   ww  w  . ja v a  2s  .c  o  m
using System;
public class MainClass{
  public static void Main(String[] argv){  
    Uri address7 = new Uri("ftp://java2s.com/files/testfile.txt");
    if (address7.Scheme == Uri.UriSchemeFtp)
        Console.WriteLine("Uri is Ftp protocol");

  }
}
    

The code above generates the following result.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version