Click here to Skip to main content
15,499,801 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to convert .NET application to native and execute it with our installing Framework Pin
OriginalGriff11-Feb-14 23:41
mveOriginalGriff11-Feb-14 23:41 
GeneralRe: How to convert .NET application to native and execute it with our installing Framework Pin
Dave Kreskowiak12-Feb-14 4:53
mveDave Kreskowiak12-Feb-14 4:53 
GeneralRe: How to convert .NET application to native and execute it with our installing Framework Pin
Ennis Ray Lynch, Jr.12-Feb-14 10:37
MemberEnnis Ray Lynch, Jr.12-Feb-14 10:37 
GeneralRe: How to convert .NET application to native and execute it with our installing Framework Pin
Dave Kreskowiak12-Feb-14 14:12
mveDave Kreskowiak12-Feb-14 14:12 
AnswerRe: How to convert .NET application to native and execute it with our installing Framework Pin
Richard MacCutchan11-Feb-14 22:38
mveRichard MacCutchan11-Feb-14 22:38 
AnswerRe: How to convert .NET application to native and execute it with our installing Framework Pin
OriginalGriff11-Feb-14 23:43
mveOriginalGriff11-Feb-14 23:43 
AnswerRe: How to convert .NET application to native and execute it with our installing Framework Pin
GuyThiebaut12-Feb-14 1:54
professionalGuyThiebaut12-Feb-14 1:54 
QuestionConverting Byte to Decimal Pin
computerpublic11-Feb-14 9:50
Membercomputerpublic11-Feb-14 9:50 

http://msdn.microsoft.com/en-us/library/aa326741%28v=vs.71%29.aspx[^]


//I WAS READING FROM THE ABOVE MICROSOFT LINK ABOUT CONVERTING //FROM BYTE TO TO DECIMAL IN C#, BUT I AM JUST NOT GETTING MY ////CODE TO WORK. I AM TRYING TO CONVERT AN ARRAY OF BYTES TO AN //ARRAY OF DECIMALS. THIS IS WHAT I AM DOING..PLEASE KINDLY SEE //BELOW.

C#
<pre>using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Applica
{
    class Program
    {
        static void Main(string[] args)
        {
            long Totbyte = 0;
            string filePath = null;
            DirectoryInfo da = new DirectoryInfo("C:\\Folder");
            FileInfo[] Arr = da.GetFiles();

            foreach (FileInfo ap in Arr)
            {
                Totbyte = ap.Length;
                filePath = ap.FullName;
            }

            string temPath = Path.GetTempFileName();
            byte[] data = new byte[Totbyte];

            if (File.Exists(temPath))
            {
                data = File.ReadAllBytes(filePath);
                File.WriteAllBytes(temPath, data);
            }       
            decimal decVal;
            int[] arry = new int[Totbyte];
            for (int count = 0; count < data.Length; count++)
            {
                arry[count] = decimal.GetBits((data[count])decVal);//THIS LINE DOES NOT WORK.
                Console.WriteLine("Byte to Decimal = {0},,,,,, count = {1}", arry[count], count);
            }
        }
    }
}


GeneralRe: Converting Byte to Decimal Pin
harold aptroot11-Feb-14 9:56
Memberharold aptroot11-Feb-14 9:56 
GeneralRe: Converting Byte to Decimal Pin
computerpublic11-Feb-14 10:07
Membercomputerpublic11-Feb-14 10:07 
GeneralRe: Converting Byte to Decimal Pin
harold aptroot11-Feb-14 10:15
Memberharold aptroot11-Feb-14 10:15 
GeneralRe: Converting Byte to Decimal Pin
computerpublic11-Feb-14 10:29
Membercomputerpublic11-Feb-14 10:29 
GeneralRe: Converting Byte to Decimal Pin
computerpublic11-Feb-14 11:09
Membercomputerpublic11-Feb-14 11:09 
GeneralRe: Converting Byte to Decimal Pin
harold aptroot11-Feb-14 23:03
Memberharold aptroot11-Feb-14 23:03 
GeneralRe: Converting Byte to Decimal Pin
computerpublic12-Feb-14 8:31
Membercomputerpublic12-Feb-14 8:31 
GeneralRe: Converting Byte to Decimal Pin
harold aptroot12-Feb-14 9:55
Memberharold aptroot12-Feb-14 9:55 
GeneralRe: Converting Byte to Decimal Pin
computerpublic12-Feb-14 10:08
Membercomputerpublic12-Feb-14 10:08 
GeneralRe: Converting Byte to Decimal Pin
harold aptroot12-Feb-14 10:16
Memberharold aptroot12-Feb-14 10:16 
GeneralRe: Converting Byte to Decimal Pin
computerpublic12-Feb-14 10:24
Membercomputerpublic12-Feb-14 10:24 
GeneralRe: Converting Byte to Decimal Pin
harold aptroot12-Feb-14 10:49
Memberharold aptroot12-Feb-14 10:49 
SuggestionRe: Converting Byte to Decimal Pin
Richard Deeming11-Feb-14 10:34
mveRichard Deeming11-Feb-14 10:34 
QuestionConverting Byte Array to Integer Array Pin
computerpublic11-Feb-14 5:10
Membercomputerpublic11-Feb-14 5:10 
AnswerRe: Converting Byte Array to Integer Array Pin
Pete O'Hanlon11-Feb-14 5:15
mvaPete O'Hanlon11-Feb-14 5:15 
GeneralRe: Converting Byte Array to Integer Array Pin
computerpublic11-Feb-14 5:31
Membercomputerpublic11-Feb-14 5:31 
GeneralRe: Converting Byte Array to Integer Array PinPopular
Pete O'Hanlon11-Feb-14 5:42
mvaPete O'Hanlon11-Feb-14 5:42 

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.