Link to home
Create AccountLog in
Avatar of paulwhelan
paulwhelan

asked on

myDecimal = new decimal(new int[] { 0, 0, 0, 0});

Hi

Anyone know what this code does?

Thanks
Paul

myDecimal = new decimal(new int[] { 0, 0, 0, 0});
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

in intializes an array of 4 items with each item having the value of 0
actually, it creates a decimal with the value of the 4 bytes initalized to 0
Avatar of paulwhelan
paulwhelan

ASKER

Would this not suffice?

myDecimal = new int[] {0,0,0,0};
"actually, it creates a decimal with the value of the 4 bytes initalized to 0"

What does that mean?
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer