AIUTO DEVO SCRIVERE DEL CODICE C# E NON SO DA DOVE PARTIRE!!!

martedì 31 luglio 2007 - 09.16

ringo982 Profilo | Newbie

Ciao a tutti!
Ho bisogno disperatamente del vostro aiuto immediato!
Devo scrivere del codice C# ed eseguirlo per poter visionare il suo output, ma sono un analfabeta del C#. Non ho idea neanche di quale sw devo usare per scrivere il codice.

Ho però già il codice o, nel caso manchi che so tipo il main ecc , buona parte di esso.

Vorrei quindi solo un mega aiuto a renderlo funzionante, in un qualche editor, e a farlo girare.

Ecco qui:


using System;

namespace GetHardwareID
{
class ActivationKey
{

public static string generateActivationKey(string hardwareIdString, string codigoprog)
{
string str3;

string str1 = "";
string str2 = "";
str3 = "";
hardwareIdString = hardwareIdString.Replace("-", "");
hardwareIdString = hardwareIdString.ToUpper();
bool flag = hardwareIdString.Length == 16;
if (!flag)
{
throw new ArgumentException("El Hardware ID no es v\u00e1lido.");
}
char[] chs = hardwareIdString.ToCharArray();
try
{
int j;

int i = 0;
do
{
string str5 = str1;
char ch = hardwareIdString[i];
string str6 = ch.GetHashCode().ToString("x");
ch = hardwareIdString[hardwareIdString.Length - (i + 1)];
string str7 = ch.GetHashCode().ToString("x");
str1 = String.Concat(str5, str6, str7);
string str8 = str2;
ch = hardwareIdString[hardwareIdString.Length - (i + 1)];
string str9 = ch.GetHashCode().ToString("x");
ch = hardwareIdString[i];
string str10 = ch.GetHashCode().ToString("x");
str2 = String.Concat(str8, str9, str10);
i++;
IL_00fd:
flag = i < 15;
}
while (flag);
str1 = String.Concat(str1, codigoprog);
j = str1.GetHashCode();
str1 = j.ToString("x");
j = str2.GetHashCode();
str2 = j.ToString("x");
str3 = String.Concat(str1, str2);
str3 = str3.ToUpper();
return str3;
}
catch
{
throw new ArgumentException("El HardwareID proporcionado no es valido");
}
}
}

}



------
Spero che qualche anima pia mi aiuti!!!
GRAZIE

simoery Profilo | Newbie

ciao, dovresti installare visual studio 200 e fra i vari linguaggi selezionare visual c#.
Devi creare una form che inserita una tringa o più ti dia un risultato?
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5