Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
GeneralRe: RegEx problem with Escape sequences Pin
Marco Bertschi12-Feb-14 21:11
protectorMarco Bertschi12-Feb-14 21:11 
GeneralRe: RegEx problem with Escape sequences Pin
Kornfeld Eliyahu Peter12-Feb-14 21:36
professionalKornfeld Eliyahu Peter12-Feb-14 21:36 
GeneralRe: RegEx problem with Escape sequences Pin
Marco Bertschi12-Feb-14 22:00
protectorMarco Bertschi12-Feb-14 22:00 
AnswerRe: RegEx problem with Escape sequences Pin
Marco Bertschi12-Feb-14 22:27
protectorMarco Bertschi12-Feb-14 22:27 
GeneralRe: RegEx problem with Escape sequences Pin
Kornfeld Eliyahu Peter13-Feb-14 2:22
professionalKornfeld Eliyahu Peter13-Feb-14 2:22 
GeneralRe: RegEx problem with Escape sequences Pin
Marco Bertschi13-Feb-14 2:47
protectorMarco Bertschi13-Feb-14 2:47 
GeneralRe: RegEx problem with Escape sequences Pin
Kornfeld Eliyahu Peter13-Feb-14 3:01
professionalKornfeld Eliyahu Peter13-Feb-14 3:01 
GeneralRe: RegEx problem with Escape sequences Pin
Marco Bertschi13-Feb-14 3:26
protectorMarco Bertschi13-Feb-14 3:26 
GeneralRe: RegEx problem with Escape sequences Pin
Kornfeld Eliyahu Peter13-Feb-14 3:34
professionalKornfeld Eliyahu Peter13-Feb-14 3:34 
GeneralRe: RegEx problem with Escape sequences Pin
Marco Bertschi13-Feb-14 4:16
protectorMarco Bertschi13-Feb-14 4:16 
QuestionCan not create CodeTemplate folder when install XSockets Pin
Member 1027154211-Feb-14 22:14
Member 1027154211-Feb-14 22:14 
AnswerRe: Can not create CodeTemplate folder when install XSockets Pin
Pete O'Hanlon11-Feb-14 22:23
mvePete O'Hanlon11-Feb-14 22:23 
QuestionHow to convert .NET application to native and execute it with our installing Framework Pin
X204011-Feb-14 12:41
X204011-Feb-14 12:41 
AnswerRe: How to convert .NET application to native and execute it with our installing Framework Pin
Dave Kreskowiak11-Feb-14 13:02
mveDave Kreskowiak11-Feb-14 13:02 
GeneralRe: How to convert .NET application to native and execute it with our installing Framework Pin
OriginalGriff11-Feb-14 22:41
mveOriginalGriff11-Feb-14 22:41 
GeneralRe: How to convert .NET application to native and execute it with our installing Framework Pin
Dave Kreskowiak12-Feb-14 3:53
mveDave Kreskowiak12-Feb-14 3:53 
GeneralRe: How to convert .NET application to native and execute it with our installing Framework Pin
Ennis Ray Lynch, Jr.12-Feb-14 9:37
Ennis Ray Lynch, Jr.12-Feb-14 9:37 
GeneralRe: How to convert .NET application to native and execute it with our installing Framework Pin
Dave Kreskowiak12-Feb-14 13:12
mveDave Kreskowiak12-Feb-14 13:12 
AnswerRe: How to convert .NET application to native and execute it with our installing Framework Pin
Richard MacCutchan11-Feb-14 21:38
mveRichard MacCutchan11-Feb-14 21:38 
AnswerRe: How to convert .NET application to native and execute it with our installing Framework Pin
OriginalGriff11-Feb-14 22:43
mveOriginalGriff11-Feb-14 22:43 
AnswerRe: How to convert .NET application to native and execute it with our installing Framework Pin
GuyThiebaut12-Feb-14 0:54
professionalGuyThiebaut12-Feb-14 0:54 
QuestionConverting Byte to Decimal Pin
computerpublic11-Feb-14 8:50
computerpublic11-Feb-14 8:50 
GeneralRe: Converting Byte to Decimal Pin
harold aptroot11-Feb-14 8:56
harold aptroot11-Feb-14 8:56 
GeneralRe: Converting Byte to Decimal Pin
computerpublic11-Feb-14 9:07
computerpublic11-Feb-14 9:07 
GeneralRe: Converting Byte to Decimal Pin
harold aptroot11-Feb-14 9:15
harold aptroot11-Feb-14 9:15 
computerpublic wrote:
i am having trouble converting from byte to decimal.
Ok, good. That's a pretty clear description. Here you go:
C#
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[] arry = new decimal[Totbyte];
            for (int count = 0; count < data.Length; count++)
            {
                arry[count] = data[count];
                Console.WriteLine("Byte to Decimal = {0},,,,,, count = {1}", arry[count], count);
            }
        }
    }
}

That's what you meant, right?

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.