Click here to Skip to main content
15,921,941 members
Home / Discussions / C#
   

C#

 
GeneralRe: howto split strings using Regular Expression Pin
Stephan Wright18-Jul-04 20:31
Stephan Wright18-Jul-04 20:31 
GeneralSysListView32 font question Pin
Dave@KeySpell15-Jul-04 23:49
sussDave@KeySpell15-Jul-04 23:49 
GeneralRe: SysListView32 font question Pin
Nick Parker16-Jul-04 1:48
protectorNick Parker16-Jul-04 1:48 
GeneralRe: SysListView32 font question Pin
Dave11216-Jul-04 3:25
Dave11216-Jul-04 3:25 
GeneralRe: SysListView32 font question Pin
eggie516-Jul-04 6:22
eggie516-Jul-04 6:22 
QuestionHow to get flicker-free richTextBox update ? Pin
evdoxos15-Jul-04 23:09
evdoxos15-Jul-04 23:09 
AnswerRe: How to get flicker-free richTextBox update ? Pin
evdoxos17-Jul-04 21:24
evdoxos17-Jul-04 21:24 
QuestionCould anybody help me Change the C-code into C# code? Pin
dxhdxh15-Jul-04 21:26
dxhdxh15-Jul-04 21:26 
I am a newbie in C#, could anybody help me do it! Thanks a lot!
#include<stdio.h>
#include<math.h>
#define BUFFERSIZE 0x100

FILE *fp1,*fp2,*fp3,*fp4;
main(int argc,char*argv[] )
{long timer[20];
int i,kl,kkl,n,vsp;
float vsp1,ps1,bn1,vsp2,ps2,bn2,vsp3,ps3,bn3;
char *dats=".dat";
char buffer[128],f,buff[100],newname[30],newaa[20],time[10];
if(argc!=4)
{ printf("you forgot to enter a filename\n");
exit(0);
}

if((fp1=fopen("zd8bxxx.ddd","wb+"))==NULL)
{ printf("input file open file\n");
exit(0);
}
if((fp2=fopen(argv[2],"ab"))==NULL)
{ printf("output1 file open file\n");
exit(0);
}
if((fp3=fopen(argv[3],"ab"))==NULL)
{ printf("output2 file open file\n");
exit(0);
}
fread(&time,sizeof(char),8,fp1);
for(i=2;i<8;i++)
newname[i-1]=time[i];
newname[0]='d';
newname[7]=0;
for(i=0;i<7;i++)
newaa[i]=newname[i+3];
strcat(newname,dats);
if((fp4=fopen(newname,"wb"))==NULL)
{ printf("output file open fail\n");
exit(0);
}

fread(&timer,sizeof(long int),14,fp1);
for(i=0;i<24;i++)
{
fread(&buffer,sizeof(char),48,fp1);

vsp=ff(buffer[0],buffer[1],buffer[2],buffer[3]);
vsp1=(float)vsp/10;
ps1=(float)ff(buffer[4],buffer[5],buffer[6],buffer[7])/100;
fprintf(fp2,"%4s%5d%8.1f%7.2f\n",newaa,i,vsp1,ps1);
fprintf(fp4,"%4s%5d%8.1f%7.2f\n" ,newaa,i,vsp1,ps1);
}
fread(&buff,sizeof(char),48,fp1);
fread(&buff,sizeof(char),48,fp1);
vsp1=(float)ff(buff[0],buff[1],buff[2],buff[3])/10;
ps1=(float)ff(buff[4],buff[5],buff[6],buff[7])/100;
bn1=(float)ff(buff[8],buff[9],buff[10],buff[11])/100;
fprintf(fp3,"%6s%8.1f%8.2f%8.2f\n",
newaa,vsp1,ps1,bn1);


fclose(fp1);
fclose(fp2);
fclose(fp3);
fclose(fp4);
}
AnswerRe: Could anybody help me Change the C-code into C# code? Pin
Michael P Butler15-Jul-04 22:24
Michael P Butler15-Jul-04 22:24 
AnswerRe: Could anybody help me Change the C-code into C# code? Pin
Matt Gerrans16-Jul-04 7:42
Matt Gerrans16-Jul-04 7:42 
QuestionHow to find path of an exe Pin
SatyaDY15-Jul-04 19:46
SatyaDY15-Jul-04 19:46 
AnswerRe: How to find path of an exe Pin
mav.northwind15-Jul-04 20:04
mav.northwind15-Jul-04 20:04 
GeneralRe: How to find path of an exe Pin
SatyaDY16-Jul-04 0:16
SatyaDY16-Jul-04 0:16 
GeneralRe: How to find path of an exe Pin
mav.northwind16-Jul-04 0:40
mav.northwind16-Jul-04 0:40 
AnswerRe: How to find path of an exe Pin
Matt Gerrans16-Jul-04 7:34
Matt Gerrans16-Jul-04 7:34 
QuestionHow to get POST headers Pin
Anonymous15-Jul-04 18:30
Anonymous15-Jul-04 18:30 
GeneralPrinting Invoice Pin
Antonius_r315-Jul-04 16:55
Antonius_r315-Jul-04 16:55 
GeneralRe: Printing Invoice Pin
sachinkalse15-Jul-04 17:58
sachinkalse15-Jul-04 17:58 
QuestionHow to Color a DataGrid row or Cell? Pin
Khang Nguyen15-Jul-04 12:25
Khang Nguyen15-Jul-04 12:25 
AnswerRe: How to Color a DataGrid row or Cell? Pin
Jay Shankar15-Jul-04 14:32
Jay Shankar15-Jul-04 14:32 
GeneralRe: How to Color a DataGrid row or Cell? Pin
Khang Nguyen16-Jul-04 7:04
Khang Nguyen16-Jul-04 7:04 
GeneralRe: How to Color a DataGrid row or Cell? Pin
Khang Nguyen20-Jul-04 6:24
Khang Nguyen20-Jul-04 6:24 
QuestionUsing a .cs file in a project without copying? Pin
MKlucher15-Jul-04 12:01
MKlucher15-Jul-04 12:01 
AnswerRe: Using a .cs file in a project without copying? Pin
MKlucher15-Jul-04 13:55
MKlucher15-Jul-04 13:55 
GeneralRe: Using a .cs file in a project without copying? Pin
Matt Gerrans16-Jul-04 7:58
Matt Gerrans16-Jul-04 7:58 

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.