Home Page
Articoli
Tips & Tricks
News
Forum
Archivio Forum
Blogs
Sondaggi
Rss
Video
Utenti
Chi Siamo
Contattaci
Username:
Password:
Login
Registrati ora!
Recupera Password
Home Page
Stanze Forum
.NET Framework
AIUTO DEVO SCRIVERE DEL CODICE C# E NON SO DA DOVE PARTIRE!!!
martedì 31 luglio 2007 - 09.16
Elenco Threads
Stanze Forum
Aggiungi ai Preferiti
Cerca nel forum
ringo982
Profilo
| Newbie
1
messaggi | Data Invio:
mar 31 lug 2007 - 09:16
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
7
messaggi | Data Invio:
ven 3 ago 2007 - 15:56
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?
Torna su
Stanze Forum
Elenco Threads
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 !