Click here to Skip to main content
15,847,077 members
Home / Discussions / C#
   

C#

 
GeneralRe: Tristate Checkbox Pin
pubududilena12-May-05 20:12
pubududilena12-May-05 20:12 
GeneralRe: Tristate Checkbox Pin
mav.northwind12-May-05 23:58
mav.northwind12-May-05 23:58 
QuestionHow to convert C# Application exe to C# code again? Pin
pubududilena12-May-05 18:12
pubududilena12-May-05 18:12 
AnswerRe: How to convert C# Application exe to C# code again? Pin
Judah Gabriel Himango12-May-05 19:45
sponsorJudah Gabriel Himango12-May-05 19:45 
GeneralRe: How to convert C# Application exe to C# code again? Pin
Priyank Bolia13-May-05 3:37
Priyank Bolia13-May-05 3:37 
GeneralRe: How to convert C# Application exe to C# code again? Pin
Dave Kreskowiak13-May-05 3:52
mveDave Kreskowiak13-May-05 3:52 
Questionhow to encode string in serialization Pin
Green Fuze12-May-05 15:36
Green Fuze12-May-05 15:36 
AnswerRe: how to encode string in serialization Pin
Stefan Prodan12-May-05 21:11
Stefan Prodan12-May-05 21:11 
Well here it is a function that i use to encode strings in XML files:
/// <summary><br />
/// Convert To Base64<br />
/// </summary><br />
/// <param name="text">clean text</param><br />
/// <param name="type">1(Unicode) 2(ASCII) 3(UTF7) 4(UTF8)</param><br />
/// <returns>Base64 string</returns><br />
public static string ToB64(string text, Int16 type)<br />
{<br />
        string rez = null;<br />
        switch (type)<br />
	{<br />
		case 1: //Unicode<br />
		rez = Convert.ToBase64String(Encoding.Unicode.GetBytes(text));<br />
		break;<br />
		case 2: //ASCII<br />
		rez = Convert.ToBase64String(Encoding.ASCII.GetBytes(text));<br />
		break;<br />
		ase 3: //UTF7<br />
		rez = Convert.ToBase64String(Encoding.UTF7.GetBytes(text));<br />
		break;<br />
		case 4: //UTF8<br />
		rez = Convert.ToBase64String(Encoding.UTF8.GetBytes(text));<br />
		break;<br />
	}<br />
	eturn rez;<br />
}

and to decode:
/// <summary><br />
/// Convert From Base64<br />
/// </summary><br />
/// <param name="text">encrypted text</param><br />
/// <param name="type">1(Unicode) 2(ASCII) 3(UTF7) 4(UTF8)</param><br />
/// <returns>clean text</returns><br />
public static string FromB64(string text, Int16 type)<br />
{<br />
	string rez = null;<br />
	switch (type)<br />
	{<br />
	case 1: //Unicode<br />
	rez = Encoding.Unicode.GetString(Convert.FromBase64String(text));<br />
	break;<br />
	case 2: //ASCII<br />
	rez = Encoding.ASCII.GetString(Convert.FromBase64String(text));<br />
	break;<br />
	case 3: //UTF7<br />
	rez = Encoding.UTF7.GetString(Convert.FromBase64String(text));<br />
	break;<br />
	case 4: //UTF8<br />
	rez = Encoding.UTF8.GetString(Convert.FromBase64String(text));<br />
	break;<br />
	}<br />
	return rez;<br />
}

AnswerRe: how to encode string in serialization Pin
StealthyMark13-May-05 5:38
StealthyMark13-May-05 5:38 
GeneralInterop question C# Pin
IsaacB12-May-05 13:58
IsaacB12-May-05 13:58 
GeneralRe: Interop question C# Pin
pubududilena12-May-05 18:10
pubududilena12-May-05 18:10 
GeneralRe: Interop question C# Pin
StealthyMark13-May-05 6:18
StealthyMark13-May-05 6:18 
QuestionApplication always on top? Pin
Anthony Mushrow12-May-05 13:32
professionalAnthony Mushrow12-May-05 13:32 
AnswerRe: Application always on top? Pin
Dave Kreskowiak12-May-05 15:25
mveDave Kreskowiak12-May-05 15:25 
GeneralRe: Application always on top? Pin
cjengler13-May-05 1:00
cjengler13-May-05 1:00 
GeneralRe: Application always on top? Pin
Dave Kreskowiak13-May-05 1:57
mveDave Kreskowiak13-May-05 1:57 
GeneralRe: Application always on top? Pin
Sebastian Schneider13-May-05 2:30
Sebastian Schneider13-May-05 2:30 
GeneralRe: Application always on top? Pin
Dave Kreskowiak13-May-05 3:50
mveDave Kreskowiak13-May-05 3:50 
GeneralWindows XP Icons Pin
Peter Vertes12-May-05 13:18
Peter Vertes12-May-05 13:18 
GeneralRe: Windows XP Icons Pin
Dave Kreskowiak12-May-05 15:22
mveDave Kreskowiak12-May-05 15:22 
GeneralRe: Windows XP Icons Pin
Polis Pilavas13-May-05 1:12
Polis Pilavas13-May-05 1:12 
GeneralC# to extract Pin
ziczaczoom200412-May-05 13:09
ziczaczoom200412-May-05 13:09 
GeneralRe: C# to extract Pin
Stefan Prodan12-May-05 13:15
Stefan Prodan12-May-05 13:15 
GeneralRe: C# to extract Pin
ziczaczoom200412-May-05 14:09
ziczaczoom200412-May-05 14:09 
GeneralRe: C# to extract Pin
Dave Kreskowiak12-May-05 15:17
mveDave Kreskowiak12-May-05 15:17 

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.