C# Uri UriSchemeNntp
Description
Uri UriSchemeNntp
specifies that the URI is an Internet
news group and is accessed through the Network News Transport Protocol (NNTP).
This field is read-only.
Syntax
Uri.UriSchemeNntp
has the following syntax.
public static readonly string UriSchemeNntp
Example
The following example creates a Uri instance and determines whether the scheme is UriSchemeNntp.
// w ww.j a va 2 s .c o m
using System;
public class MainClass{
public static void Main(String[] argv){
Uri address5 = new Uri("nntp://news.java2s.com/123456@java2s.com");
if (address5.Scheme == Uri.UriSchemeNntp)
Console.WriteLine("Uri is nntp protocol");
}
}
The code above generates the following result.