Home » C#.Net

Int32.MaxValue property with example in C#

C# Int32.MaxValue property: Here, we are going to learn about the MaxValue property of int (Int32) struct with its description, syntax, and example.
Submitted by IncludeHelp, on October 02, 2019

Int32.MaxValue Property

MaxValue property is GET property to get the maximum value of System.Int32.

Syntax:

    int int.MaxValue;

Return value:

int – it returns the maximum value of System.Int32.

Int32.MaxValue Property Example in C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int intMaxVal = 0;

            intMaxVal = int.MaxValue;

            Console.WriteLine("Return Type is : " + int.MaxValue.GetType());
            Console.WriteLine("Max value of System.Int32 : " + intMaxVal);
        }
    }
}

Output

Return Type is : System.Int32
Max value of System.Int32 : 2147483647






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.