Click here to Skip to main content
14,693,448 members
Home » Discussions » C#
   

C#

 
GeneralRe: c# Project Pin
arun exe21-Aug-19 21:24
professionalarun exe21-Aug-19 21:24 
QuestionExcel's MOD in C#? Pin
Jassim Rahma18-Aug-19 9:51
MemberJassim Rahma18-Aug-19 9:51 
AnswerRe: Excel's MOD in C#? Pin
Pete O'Hanlon18-Aug-19 13:20
subeditorPete O'Hanlon18-Aug-19 13:20 
GeneralRe: Excel's MOD in C#? Pin
Jassim Rahma18-Aug-19 22:38
MemberJassim Rahma18-Aug-19 22:38 
GeneralRe: Excel's MOD in C#? Pin
Peter_in_278018-Aug-19 22:58
professionalPeter_in_278018-Aug-19 22:58 
GeneralRe: Excel's MOD in C#? Pin
Jassim Rahma18-Aug-19 23:18
MemberJassim Rahma18-Aug-19 23:18 
GeneralRe: Excel's MOD in C#? Pin
Peter_in_278018-Aug-19 23:25
professionalPeter_in_278018-Aug-19 23:25 
AnswerRe: Excel's MOD in C#? Pin
OriginalGriff18-Aug-19 23:08
mveOriginalGriff18-Aug-19 23: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:
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 23:22
MemberJassim Rahma18-Aug-19 23:22 
GeneralRe: Excel's MOD in C#? Pin
OriginalGriff18-Aug-19 23:28
mveOriginalGriff18-Aug-19 23:28 
GeneralRe: Excel's MOD in C#? Pin
BillWoodruff19-Aug-19 22:48
mveBillWoodruff19-Aug-19 22:48 
AnswerRe: Excel's MOD in C#? Pin
BillWoodruff20-Aug-19 0:43
mveBillWoodruff20-Aug-19 0:43 
SuggestionRe: Excel's MOD in C#? Pin
Richard Deeming20-Aug-19 2:39
mveRichard Deeming20-Aug-19 2:39 
GeneralRe: Excel's MOD in C#? Pin
BillWoodruff20-Aug-19 4:07
mveBillWoodruff20-Aug-19 4:07 
GeneralRe: Excel's MOD in C#? Pin
Richard Deeming20-Aug-19 4:23
mveRichard Deeming20-Aug-19 4:23 
GeneralRe: Excel's MOD in C#? Pin
BillWoodruff20-Aug-19 5:42
mveBillWoodruff20-Aug-19 5:42 
GeneralRe: Excel's MOD in C#? Pin
Richard Deeming20-Aug-19 6:27
mveRichard Deeming20-Aug-19 6:27 
Questionc# Pin
Member 1456180618-Aug-19 6:22
MemberMember 1456180618-Aug-19 6:22 
AnswerRe: c# Pin
OriginalGriff18-Aug-19 7:35
mveOriginalGriff18-Aug-19 7:35 
AnswerRe: c# Pin
#realJSOP21-Aug-19 2:38
mva#realJSOP21-Aug-19 2:38 
QuestionZKTeco merge 3 finger print C# with ZKFingerSDK Pin
Rikus Marais14-Aug-19 3:33
MemberRikus Marais14-Aug-19 3:33 
AnswerRe: ZKTeco merge 3 finger print C# with ZKFingerSDK Pin
OriginalGriff14-Aug-19 5:08
mveOriginalGriff14-Aug-19 5:08 
GeneralRe: ZKTeco merge 3 finger print C# with ZKFingerSDK Pin
Richard Deeming14-Aug-19 8:56
mveRichard Deeming14-Aug-19 8:56 
AnswerRe: ZKTeco merge 3 finger print C# with ZKFingerSDK Pin
Gerry Schmitz15-Aug-19 5:02
mveGerry Schmitz15-Aug-19 5:02 
GeneralRe: ZKTeco merge 3 finger print C# with ZKFingerSDK Pin
OriginalGriff15-Aug-19 5:12
mveOriginalGriff15-Aug-19 5: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.