×

C# Tutorial

Basics of .Net

C# Basics

C# Fundamentals

C# Operators

C# Loops

C# Type Conversions

C# Exception Handling

C# String Class

C# Arrays

C# List

C# Stack

C# Queue

C# Collections

C# Character Class

C# Class and Object

C# Namespaces

C# Delegates

C# Constructors

C# Inheritance

C# Operator Overloading

C# Structures

C# File Handling

C# Convert.ToInt32()

C# Int32 (int) Struct

C# DateTime Class

C# Uri Class

C# Database Connectivity

C# Windows

C# Other Topics

C# Q & A

C# Programs

C# Find O/P

Home » C#

C# | Uri.GetType() Method with Example

Uri.GetType() Method: Here, we are going to learn about the GetType() method of Uri class with example in C#.
Submitted by Nidhi, on March 26, 2020

Uri.GetType() Method

Uri.GetType() method is an override method that is used to return, the type of current object.

Syntax:

    Type Uri.GetType();

Parameter(s):

  • It does not accept any parameter.

Return value:

The return type of this method is Type, it returns the type of current object.

Example to demonstrate example of Uri.GetType() method

using System;

class UriExample
{
    //Entry point of Program
    static public void Main()
    {
        // Create an object of Uri
        Uri Address;

        Address = new Uri("https://www.includehelp.com/index.html#search");

        Console.WriteLine(Address.GetType());
    }
}

Output

System.Uri
Press any key to continue . . .
Advertisement
Advertisement


Comments and Discussions!

Load comments ↻


Advertisement
Advertisement
Advertisement

Copyright © 2025 www.includehelp.com. All rights reserved.