- 1). Open Visual Studio 2010 and start a new project by clicking on "File" and selecting "New Project."
- 2). Select "Console Application" under the C# heading in the New Project dialog. A new source code file appears in the main workspace, with nothing more than an empty Main function.
- 3). Declare a new BigInteger type by writing the following line inside the curly brackets of the "Main" function in the source code file:
BigInteger bigNumber = new BigInteger(1000); - 4). Declare a new int type by writing the following line below the previous line of code:
int smallNumber = 5; - 5). Assign the BigInteger to the integer by using the following conversion function:
smallNumber = new Integer(bigNumber.intValue());
SHARE