C# में Uri.IsWellFormedOriginalString () विधि इंगित करती है कि क्या इस उरी को बनाने के लिए उपयोग की जाने वाली स्ट्रिंग अच्छी तरह से बनाई गई थी और इसे आगे से बचने की आवश्यकता नहीं है।
सिंटैक्स
निम्नलिखित वाक्य रचना है -
public bool IsWellFormedOriginalString ();
उदाहरण
आइए अब Uri.IsWellFormedOriginalString() विधि को लागू करने के लिए एक उदाहरण देखें -
using System;
public class Demo {
public static void Main(){
Uri newURI1 = new Uri("https://www.tutorialspoint.com/index.htm");
Console.WriteLine("URI = "+newURI1);
Uri newURI2 = new Uri("https://www.qries.com/");
Console.WriteLine("URI = "+newURI2);
if(newURI1.Equals(newURI2))
Console.WriteLine("Both the URIs are equal!");
else
Console.WriteLine("Both the URIs aren't equal!");
if(newURI1.IsWellFormedOriginalString())
Console.WriteLine("newURI1 is well formed!");
else
Console.WriteLine("newURI1 isn't well formed!");
}
} आउटपुट
यह निम्नलिखित आउटपुट देगा -
URI = https://www.tutorialspoint.com/index.htm URI = https://www.tutorialspoint.com/ Both the URIs aren't equal! newURI1 is well formed!