Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
AnswerRe: Dll References and Dependencies Pin
Pete O'Hanlon3-Mar-14 10:09
mvePete O'Hanlon3-Mar-14 10:09 
GeneralRe: Dll References and Dependencies Pin
Richard Andrew x643-Mar-14 13:16
professionalRichard Andrew x643-Mar-14 13:16 
AnswerRe: Dll References and Dependencies Pin
Matt T Heffron3-Mar-14 13:59
professionalMatt T Heffron3-Mar-14 13:59 
AnswerRe: Dll References and Dependencies Pin
BobJanova4-Mar-14 5:27
BobJanova4-Mar-14 5:27 
GeneralRe: Dll References and Dependencies Pin
MarkB1234-Mar-14 5:34
MarkB1234-Mar-14 5:34 
Questiondatatype in DataGridview Pin
naylynn3-Mar-14 4:29
naylynn3-Mar-14 4:29 
AnswerRe: datatype in DataGridview Pin
Raj Mouli7-Mar-14 18:51
Raj Mouli7-Mar-14 18:51 
QuestionInvalid Argument in For Loop Pin
computerpublic2-Mar-14 8:03
computerpublic2-Mar-14 8:03 
C#
<pre>/* I am getting an invalid argument error in my for loop and I don't understand why */
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Boolean;

namespace Applica
{
    class Program
    {
        static void Main(string[] args)
        {
            DirectoryInfo da = new DirectoryInfo("C:\\Folder9");
            FileInfo[] Arr = da.GetFiles();
            FileInfo ap = Arr[Arr.Length - 1];
            long Totbyte = ap.Length;
            string filePath = ap.FullName;
            string temPath = Path.GetTempFileName();
            byte[] data = File.ReadAllBytes(filePath);
            File.WriteAllBytes(temPath, data);            
            byte[] dataB = new byte[1];
            BitArray bits = new BitArray(dataB);
            for (uint counter = 0; counter < Totbyte; counter++)
            {
                dataB[0] = data[counter];
                for (uint count = 0; count < bits.Length; count++)
                {
                    if (bits[count] == 0)
                        Console.Write(bits[count] ? "1" : "0");
                }
            }
        }
    }
}


AnswerRe: Invalid Argument in For Loop Pin
Pete O'Hanlon2-Mar-14 8:06
mvePete O'Hanlon2-Mar-14 8:06 
GeneralRe: Invalid Argument in For Loop Pin
computerpublic2-Mar-14 8:09
computerpublic2-Mar-14 8:09 
GeneralRe: Invalid Argument in For Loop Pin
computerpublic2-Mar-14 8:12
computerpublic2-Mar-14 8:12 
AnswerRe: Invalid Argument in For Loop Pin
PIEBALDconsult2-Mar-14 8:27
mvePIEBALDconsult2-Mar-14 8:27 
GeneralRe: Invalid Argument in For Loop Pin
computerpublic2-Mar-14 8:33
computerpublic2-Mar-14 8:33 
QuestionRe: Invalid Argument in For Loop Pin
Eddy Vluggen2-Mar-14 9:04
professionalEddy Vluggen2-Mar-14 9:04 
AnswerMessage Closed Pin
2-Mar-14 9:17
computerpublic2-Mar-14 9:17 
GeneralRe: Invalid Argument in For Loop Pin
Richard MacCutchan2-Mar-14 22:43
mveRichard MacCutchan2-Mar-14 22:43 
AnswerRe: Invalid Argument in For Loop Pin
noone24072-Mar-14 17:46
noone24072-Mar-14 17:46 
GeneralRe: Invalid Argument in For Loop Pin
computerpublic2-Mar-14 18:00
computerpublic2-Mar-14 18:00 
GeneralRe: Invalid Argument in For Loop Pin
noone24072-Mar-14 18:32
noone24072-Mar-14 18:32 
AnswerRe: Invalid Argument in For Loop Pin
OriginalGriff2-Mar-14 22:49
mveOriginalGriff2-Mar-14 22:49 
GeneralRe: Invalid Argument in For Loop Pin
computerpublic3-Mar-14 3:52
computerpublic3-Mar-14 3:52 
GeneralRe: Invalid Argument in For Loop Pin
OriginalGriff3-Mar-14 4:30
mveOriginalGriff3-Mar-14 4:30 
AnswerRe: Invalid Argument in For Loop Pin
Richard MacCutchan2-Mar-14 22:54
mveRichard MacCutchan2-Mar-14 22:54 
GeneralRe: Invalid Argument in For Loop Pin
computerpublic3-Mar-14 3:53
computerpublic3-Mar-14 3:53 
GeneralRe: Invalid Argument in For Loop Pin
Richard MacCutchan3-Mar-14 4:11
mveRichard MacCutchan3-Mar-14 4:11 

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.