Click here to Skip to main content
15,884,298 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# Project Pin
arun exe21-Aug-19 20:24
professionalarun exe21-Aug-19 20:24 
QuestionExcel's MOD in C#? Pin
Jassim Rahma18-Aug-19 8:51
Jassim Rahma18-Aug-19 8:51 
AnswerRe: Excel's MOD in C#? Pin
Pete O'Hanlon18-Aug-19 12:20
mvePete O'Hanlon18-Aug-19 12:20 
GeneralRe: Excel's MOD in C#? Pin
Jassim Rahma18-Aug-19 21:38
Jassim Rahma18-Aug-19 21:38 
GeneralRe: Excel's MOD in C#? Pin
Peter_in_278018-Aug-19 21:58
professionalPeter_in_278018-Aug-19 21:58 
GeneralRe: Excel's MOD in C#? Pin
Jassim Rahma18-Aug-19 22:18
Jassim Rahma18-Aug-19 22:18 
GeneralRe: Excel's MOD in C#? Pin
Peter_in_278018-Aug-19 22:25
professionalPeter_in_278018-Aug-19 22:25 
AnswerRe: Excel's MOD in C#? Pin
OriginalGriff18-Aug-19 22:08
mveOriginalGriff18-Aug-19 22:08 
MOD in Excel is a true Modulus: % in C# is a remainder, and the two are not the same: Mod and Remainder are not the Same – Rob Conery[^]

What you need is to write a modulus method:
C#
private double Mod(double a, double b)
    {
    return a - b * Math.Floor(a / b);
    }
Call that, and you'll get the answer you're expecting.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Excel's MOD in C#? Pin
Jassim Rahma18-Aug-19 22:22
Jassim Rahma18-Aug-19 22:22 
GeneralRe: Excel's MOD in C#? Pin
OriginalGriff18-Aug-19 22:28
mveOriginalGriff18-Aug-19 22:28 
GeneralRe: Excel's MOD in C#? Pin
BillWoodruff19-Aug-19 21:48
professionalBillWoodruff19-Aug-19 21:48 
AnswerRe: Excel's MOD in C#? Pin
BillWoodruff19-Aug-19 23:43
professionalBillWoodruff19-Aug-19 23:43 
SuggestionRe: Excel's MOD in C#? Pin
Richard Deeming20-Aug-19 1:39
mveRichard Deeming20-Aug-19 1:39 
GeneralRe: Excel's MOD in C#? Pin
BillWoodruff20-Aug-19 3:07
professionalBillWoodruff20-Aug-19 3:07 
GeneralRe: Excel's MOD in C#? Pin
Richard Deeming20-Aug-19 3:23
mveRichard Deeming20-Aug-19 3:23 
GeneralRe: Excel's MOD in C#? Pin
BillWoodruff20-Aug-19 4:42
professionalBillWoodruff20-Aug-19 4:42 
GeneralRe: Excel's MOD in C#? Pin
Richard Deeming20-Aug-19 5:27
mveRichard Deeming20-Aug-19 5:27 
Questionc# Pin
Member 1456180618-Aug-19 5:22
Member 1456180618-Aug-19 5:22 
AnswerRe: c# Pin
OriginalGriff18-Aug-19 6:35
mveOriginalGriff18-Aug-19 6:35 
AnswerRe: c# Pin
#realJSOP21-Aug-19 1:38
mve#realJSOP21-Aug-19 1:38 
QuestionZKTeco merge 3 finger print C# with ZKFingerSDK Pin
Rikus Marais14-Aug-19 2:33
Rikus Marais14-Aug-19 2:33 
AnswerRe: ZKTeco merge 3 finger print C# with ZKFingerSDK Pin
OriginalGriff14-Aug-19 4:08
mveOriginalGriff14-Aug-19 4:08 
GeneralRe: ZKTeco merge 3 finger print C# with ZKFingerSDK Pin
Richard Deeming14-Aug-19 7:56
mveRichard Deeming14-Aug-19 7:56 
AnswerRe: ZKTeco merge 3 finger print C# with ZKFingerSDK Pin
Gerry Schmitz15-Aug-19 4:02
mveGerry Schmitz15-Aug-19 4:02 
GeneralRe: ZKTeco merge 3 finger print C# with ZKFingerSDK Pin
OriginalGriff15-Aug-19 4:12
mveOriginalGriff15-Aug-19 4:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.