DateTime ClockTime = DateTime.Now;
DateTime Result;
Double x = 0.25;
if (ClockTime.Minute % (60 * x) == 0 && ClockTime.Second == 0) // Time is at the x minute.
Result = ClockTime;
else
Result = ClockTime.AddMinutes(-ClockTime.Minute % (60 * x)).AddMinutes(60 * x);
ASKER
ASKER
C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsoft Intermediate Language (MSIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR).
TRUSTED BY
Not sure I follow what you want to accomplish... could you please try and further explain the scenario?
Also is the double "x=0.25" equal to 25 minutes?