Click here to Skip to main content
15,907,225 members
Home / Discussions / C#
   

C#

 
GeneralRe: Remove Controls Pin
BillWoodruff4-Mar-14 14:45
professionalBillWoodruff4-Mar-14 14:45 
AnswerRe: Remove Controls Pin
Dave Kreskowiak4-Mar-14 3:40
mveDave Kreskowiak4-Mar-14 3:40 
AnswerUse a curtain! Pin
Ravi Bhavnani4-Mar-14 4:41
professionalRavi Bhavnani4-Mar-14 4:41 
AnswerRe: Remove Controls Pin
BillWoodruff4-Mar-14 14:57
professionalBillWoodruff4-Mar-14 14:57 
QuestionHow to use the GoF in project? Pin
wmikas3-Mar-14 15:22
wmikas3-Mar-14 15:22 
AnswerRe: How to use the GoF in project? Pin
BillWoodruff3-Mar-14 17:35
professionalBillWoodruff3-Mar-14 17:35 
GeneralRe: How to use the GoF in project? Pin
wmikas4-Mar-14 1:10
wmikas4-Mar-14 1:10 
AnswerRe: How to use the GoF in project? Pin
dan!sh 3-Mar-14 19:40
professional dan!sh 3-Mar-14 19:40 
GeneralRe: How to use the GoF in project? Pin
harold aptroot3-Mar-14 22:35
harold aptroot3-Mar-14 22:35 
AnswerRe: How to use the GoF in project? Pin
gkrannich3-Mar-14 22:58
gkrannich3-Mar-14 22:58 
AnswerRe: How to use the GoF in project? Pin
Jubayer Ahmed4-Mar-14 0:44
professionalJubayer Ahmed4-Mar-14 0:44 
AnswerRe: How to use the GoF in project? Pin
BobJanova4-Mar-14 6:06
BobJanova4-Mar-14 6:06 
QuestionDll References and Dependencies Pin
MarkB1233-Mar-14 7:58
MarkB1233-Mar-14 7:58 
AnswerRe: Dll References and Dependencies Pin
Richard Andrew x643-Mar-14 8:38
professionalRichard Andrew x643-Mar-14 8:38 
GeneralRe: Dll References and Dependencies Pin
MarkB1233-Mar-14 8:57
MarkB1233-Mar-14 8:57 
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 

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.