first ex
This commit is contained in:
33
first/SplitNumber.cs
Normal file
33
first/SplitNumber.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace first
|
||||
{
|
||||
public class SplitNumber
|
||||
{
|
||||
public double First
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public double Second
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public double Value
|
||||
{
|
||||
get { return First + Second; }
|
||||
set
|
||||
{
|
||||
First = Math.Truncate(value);
|
||||
Second = value - First;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user