Click here to Skip to main content
15,892,674 members
Home / Discussions / C#
   

C#

 
AnswerRe: HI ANYBODY PLS HELP ME ! Pin
Luc Pattyn5-Mar-12 8:48
sitebuilderLuc Pattyn5-Mar-12 8:48 
AnswerRe: HI ANYBODY PLS HELP ME ! Pin
Shameel5-Mar-12 2:22
professionalShameel5-Mar-12 2:22 
AnswerRe: HI ANYBODY PLS HELP ME ! Pin
PIEBALDconsult5-Mar-12 7:20
mvePIEBALDconsult5-Mar-12 7:20 
AnswerRe: HI ANYBODY PLS HELP ME ! Pin
jschell5-Mar-12 8:31
jschell5-Mar-12 8:31 
QuestionDisplay images in Gridview Pin
Elizabeth Rani4-Mar-12 18:43
Elizabeth Rani4-Mar-12 18:43 
AnswerRe: Display images in Gridview Pin
Abhinav S4-Mar-12 21:09
Abhinav S4-Mar-12 21:09 
AnswerRe: Display images in Gridview Pin
Montasser Ben Ouhida4-Mar-12 21:41
Montasser Ben Ouhida4-Mar-12 21:41 
QuestionBinary Read and Write Pin
computerpublic4-Mar-12 17:45
computerpublic4-Mar-12 17:45 
Hi Everyone,
I am very new to C# and I wrote this code from the book which compiles and run without any problem. After I execute the program, it give me nothing in the black output screen. I think this program possible need some sort of external file to "act-on." I am really not sure what it needs, the book leaves me hanging (it does say anything an external file or what to name the file). Please kindly help.


using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication_test
{
public class Program
{
const int BufferSize = 1024;
public static void Main(string[] args)
{
string tempPath = Path.GetTempFileName();
string tempPath2 = Path.GetTempFileName();

if (File.Exists(tempPath))
{
using (FileStream input = File.OpenRead(tempPath))
{
byte[] buffer = new byte[BufferSize];
int bytesRead;

using (FileStream output = File.OpenWrite(tempPath2))
{
while ((bytesRead = input.Read(buffer, 0, BufferSize)) > 0)
{
output.Write(buffer, 0, bytesRead);
}
}
}
}
}
}
}

Thanks.
AnswerRe: Binary Read and Write Pin
Bernhard Hiller4-Mar-12 19:22
Bernhard Hiller4-Mar-12 19:22 
GeneralRe: Binary Read and Write Pin
computerpublic7-Mar-12 6:38
computerpublic7-Mar-12 6:38 
Questionintegrate two solution Pin
MemberDotNetting4-Mar-12 12:16
MemberDotNetting4-Mar-12 12:16 
AnswerRe: integrate two solution Pin
Dave Kreskowiak4-Mar-12 12:50
mveDave Kreskowiak4-Mar-12 12:50 
GeneralRe: integrate two solution Pin
MemberDotNetting4-Mar-12 12:58
MemberDotNetting4-Mar-12 12:58 
AnswerRe: integrate two solution Pin
Richard Andrew x644-Mar-12 12:51
professionalRichard Andrew x644-Mar-12 12:51 
GeneralRe: integrate two solution Pin
MemberDotNetting4-Mar-12 12:58
MemberDotNetting4-Mar-12 12:58 
GeneralRe: integrate two solution Pin
Dave Kreskowiak4-Mar-12 16:53
mveDave Kreskowiak4-Mar-12 16:53 
Questionlooking for binding properties dynamicly in wpf Pin
Aymane Farissi4-Mar-12 4:58
Aymane Farissi4-Mar-12 4:58 
AnswerRe: looking for binding properties dynamicly in wpf Pin
Richard Andrew x644-Mar-12 6:38
professionalRichard Andrew x644-Mar-12 6:38 
AnswerRe: looking for binding properties dynamicly in wpf Pin
Dave Kreskowiak4-Mar-12 7:23
mveDave Kreskowiak4-Mar-12 7:23 
Questionhelp Pin
Member 86946024-Mar-12 3:37
Member 86946024-Mar-12 3:37 
AnswerRe: help Pin
Richard MacCutchan4-Mar-12 3:42
mveRichard MacCutchan4-Mar-12 3:42 
AnswerRe: help Pin
Richard Andrew x644-Mar-12 6:39
professionalRichard Andrew x644-Mar-12 6:39 
AnswerRe: help Pin
Dave Kreskowiak4-Mar-12 7:21
mveDave Kreskowiak4-Mar-12 7:21 
AnswerRe: help Pin
Shameel5-Mar-12 2:24
professionalShameel5-Mar-12 2:24 
QuestionGridView Delete Row Pin
murali_utr4-Mar-12 3:11
murali_utr4-Mar-12 3: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.