Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7780135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:49:07+00:00 2026-06-01T18:49:07+00:00

Can anyone help me in understanding to know the difference between decimal and decimal?

  • 0

Can anyone help me in understanding to know the difference between decimal and decimal? or int and int??.

When should I use them and what are the positives of using either of them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T18:49:08+00:00Added an answer on June 1, 2026 at 6:49 pm

    data types with ? are nullable types. They can hold null value as well
    Check out this Source link

    • Nullable types represent value-type variables that can be assigned the value of null. You cannot create a nullable type based on a
      reference type. (Reference types already support the null value.)
    • The syntax T? (in C#) is shorthand for System.Nullable, where T is a value type. The two forms are interchangeable.
    • Assign a value to a nullable type in the same way as for an ordinary value type, for example:
      C#: int? x = 10; or double? d = 4.108;

      VB.NET: Dim x As Nullable(Of Integer) = 10 or Dim d As Nullable(Of Double) = 4.108

    • Use the System.Nullable.GetValueOrDefault method to return either the assigned value, or the default value for the underlying type if
      the value is null, for example

      C#: int j = x.GetValueOrDefault();

      VB.NET: Dim j as Integer = x.GetValueOrDefault()

    • Use the HasValue and Value read-only properties to test for null and retrieve the value.

    • The HasValue property returns true if the variable contains a value, or false if it is null.
    • The Value property returns a value if one is assigned, otherwise a System.InvalidOperationException is thrown.
    • The default value for a nullable type variable sets HasValue to false. The Value is undefined.
      In C# 4.0
    • Use the ?? (C#) operator to assign a default value that will be applied when a nullable type whose current value is null is assigned
      to a non-nullable type, for example
    int? x = null; 
    int y = x ?? -1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone help me in understanding the above? Don't understand when to use to
I was wondering if anyone can help me understanding the Ruby code below? I'm
I wonder if anyone can help improve my understanding of JOINs in SQL. [If
Can anyone help me to figure out the the use of yield and return
Can anyone help? I have been using the entity framework and its going well
Can anyone help with this... vector<unsigned int> *vVec = new vector<unsigned int>; vVec .reserve(frankReservedSpace);
I would like to know if anyone can help me out with a problem
Can anyone help me in understanding how this will created 19 process? Main() {
Can anyone help me out understanding the various parameter passing modes in Scheme? I
having a bit of trouble understanding assembly multiplication. Can anyone help break down the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.