Using this tutorial, we are going to run the script C# program to demonstrate the use of UriSchemeNews property of Uri class. Below you will find the possibilities for doing the task using this tutorial.

C# program to demonstrate the use of UriSchemeNews property of Uri class
using System;
class UriExample
{
//Entry point of Program
static public void Main()
{
Uri uriAddress = new Uri("news:[email protected]");
Console.WriteLine(uriAddress.Scheme);
Console.WriteLine(Uri.UriSchemeNews);
if (uriAddress.Scheme == Uri.UriSchemeNews)
Console.WriteLine("Given Uri is an news group and accessed through the Network News Transport Protocol(NNTP)");
else
Console.WriteLine("Given Uri is not an news group and accessed through the Network News Transport Protocol(NNTP)");
}
}
news
news
Given Uri is an news group and accessed through the Network News Transport Protocol(NNTP)
Press any key to continue . . .
Final Words
I hope this article is a C# program to demonstrate the use of UriSchemeNews property of Uri class Let me know in the comments section if you have any issues.