Click here to Skip to main content
15,896,201 members
Home / Discussions / C#
   

C#

 
GeneralRe: System.Security.Cryptography for encrypting binary files (not plain text) Pin
Cyrilix26-Sep-08 12:44
Cyrilix26-Sep-08 12:44 
GeneralRe: System.Security.Cryptography for encrypting binary files (not plain text) Pin
Guffa26-Sep-08 15:46
Guffa26-Sep-08 15:46 
GeneralRe: System.Security.Cryptography for encrypting binary files (not plain text) Pin
ajtunbridge26-Sep-08 15:52
ajtunbridge26-Sep-08 15:52 
QuestionCodeDom and partial method Pin
Member 346950026-Sep-08 7:56
Member 346950026-Sep-08 7:56 
AnswerRe: CodeDom and partial method Pin
Ennis Ray Lynch, Jr.26-Sep-08 8:01
Ennis Ray Lynch, Jr.26-Sep-08 8:01 
AnswerRe: CodeDom and partial method Pin
Pete O'Hanlon27-Sep-08 9:26
mvePete O'Hanlon27-Sep-08 9:26 
AnswerRe: CodeDom and partial method Pin
jatin.sabarmati23-Nov-08 16:47
jatin.sabarmati23-Nov-08 16:47 
QuestionC# vs VB6.0 Pin
Pedram Behroozi26-Sep-08 6:46
Pedram Behroozi26-Sep-08 6:46 
I created 3000 labels and added them into my form (I really didn't need these labels, I was just testing).

My C# code:
int x, y;
Label[] lab = new Label[3000];
for (int i = 0; i < 3000; i++)
{
   lab[i] = new Label();
   x = i / 100;
   y = i % 100;
   lab[i].Tag = string.Format("{0},{1}", x.ToString(), y.ToString());
   lab[i].AutoSize = false;
   lab[i].Top = (x - 1) * 10;
   lab[i].Left = (y - 1) * 10;
   lab[i].Height = 10;
   lab[i].Width = 10;
   this.Controls.Add(lab[i]);
}


My VB6.0 code:
Dim i%
Dim x$
Dim y$

For i% = 2 To 3000
   Load lblPage(t%)
   x$ = i% \ 100 + 1
   y$ = i% Mod 100
   lblPage(i%).Tag = x$ + "," + y$
   lblPage(i%).Top = (i% \ 100) * lblPage(1).Height
   lblPage(i%).Left = (i% Mod 100 - 1) * lblPage(1).Width
   lblPage(i%).Visible = True
Next i%


And my problem is speed!
C#: about 5seconds
VB6: less than a second!!!
Why?
Besides I have to insert approximately 100MB .Net Framework package in my installation package while I really don't need all of .Net Framework features, in this case I have to tell my users: "Please be patient! We'll continue after a while! Roll eyes | :rolleyes: "
Is there anyway to solve these problems? If not I think I'll not use C# anymore! Sigh | :sigh:
AnswerRe: C# vs VB6.0 Pin
Fernando A. Gomez F.26-Sep-08 7:03
Fernando A. Gomez F.26-Sep-08 7:03 
AnswerRe: C# vs VB6.0 [modified] Pin
Judah Gabriel Himango26-Sep-08 7:08
sponsorJudah Gabriel Himango26-Sep-08 7:08 
GeneralRe: C# vs VB6.0 Pin
Pedram Behroozi26-Sep-08 7:23
Pedram Behroozi26-Sep-08 7:23 
GeneralRe: C# vs VB6.0 [modified] Pin
Judah Gabriel Himango26-Sep-08 7:40
sponsorJudah Gabriel Himango26-Sep-08 7:40 
GeneralRe: C# vs VB6.0 Pin
Paul Conrad26-Sep-08 8:37
professionalPaul Conrad26-Sep-08 8:37 
AnswerRe: C# vs VB6.0 Pin
Wendelius26-Sep-08 7:39
mentorWendelius26-Sep-08 7:39 
GeneralRe: C# vs VB6.0 Pin
Pedram Behroozi26-Sep-08 8:09
Pedram Behroozi26-Sep-08 8:09 
GeneralRe: C# vs VB6.0 Pin
Wendelius26-Sep-08 8:17
mentorWendelius26-Sep-08 8:17 
AnswerRe: C# vs VB6.0 Pin
Ennis Ray Lynch, Jr.26-Sep-08 7:59
Ennis Ray Lynch, Jr.26-Sep-08 7:59 
AnswerRe: C# vs VB6.0 Pin
Pete O'Hanlon26-Sep-08 8:17
mvePete O'Hanlon26-Sep-08 8:17 
GeneralRe: C# vs VB6.0 Pin
piyey26-Sep-08 10:29
piyey26-Sep-08 10:29 
AnswerRe: C# vs VB6.0 Pin
Paul Conrad26-Sep-08 8:40
professionalPaul Conrad26-Sep-08 8:40 
GeneralRe: C# vs VB6.0 Pin
Pedram Behroozi26-Sep-08 9:58
Pedram Behroozi26-Sep-08 9:58 
AnswerRe: C# vs VB6.0 Pin
Guffa26-Sep-08 8:52
Guffa26-Sep-08 8:52 
AnswerRe: C# vs VB6.0 Pin
Mohammad Dayyan26-Sep-08 9:23
Mohammad Dayyan26-Sep-08 9:23 
GeneralRe: C# vs VB6.0 Pin
Pete O'Hanlon26-Sep-08 9:57
mvePete O'Hanlon26-Sep-08 9:57 
GeneralRe: C# vs VB6.0 Pin
Adam Maras26-Sep-08 10:27
Adam Maras26-Sep-08 10:27 

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.