You are working with integers here. Try using decimals for all the numbers in your calculation.
decimal share = (18m / 58m) * 100m;
More Related Contents:
- What does principal end of an association means in 1:1 relationship in Entity framework
- using a class defined in a c++ dll in c# code
- Model Binding to a List MVC 4
- Using IQueryable with Linq
- What is the minimum client footprint required to connect C# to an Oracle database?
- How To Test if Type is Primitive
- Call non-static method in server-side from client-side using JavsScript
- How would you make a unique filename by adding a number?
- Two-way / bidirectional Dictionary in C#?
- Help with a OleDB connection string for excel files
- JQuery ajax call to httpget webmethod (c#) not working
- Weak event handler model for use with lambdas
- Limiting double to 3 decimal places
- Check for special characters (/*-+_@&$#%) in a string?
- Difference between namespace in C# and package in Java
- C# Asp.net write file to client
- C# quickest way to shift array
- Dictionary map to an object using Automapper
- How to access page controls inside a static web method? [duplicate]
- Prevent textbox autofill with previously entered values
- String compare C# – whole word match
- How do I use SELECT GROUP BY in DataTable.Select(Expression)?
- Sorting a linked list
- Get text between 2 html tags c#
- Make DateTimePicker work as TimePicker only in WinForms
- AutoMapper Migrating from static API
- TableLayoutPanel responds very slowly to events
- How to receive event when user changes system’s culture
- Modelling polymorphic associations database-first vs code-first
- Is Injection Possible through Dynamic LINQ?