Results 1 to 3 of 3

Thread: FIX function in c#

  1. #1

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    FIX function in c#

    hi guyz! is there any function in C#.net that is equivalent to FIX function in VB.net. Thanks in advance!

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: FIX function in c#

    The Fix function returns an integral value by rounding a number towards zero. Math.Truncate also rounds a number towards zero. The difference is that Fix accepts a parameter of any numerical type and returns a value of the same type, while Math.Truncate only accepts Double and Decimal parameters and returns a value of the same type. Given that there's not much point rounding a type that cannot have a fractional part that is not really a problem. The one thing that may be of interest is that Single values will be converted to Double.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member daimous's Avatar
    Join Date
    Aug 2005
    Posts
    657

    Re: FIX function in c#

    Ok thanks!!! you're such a really great elp to me jmcilhinney!!! really thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width