Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VB to C#

Empfohlene Antworten

Veröffentlicht

Hallo Leutz,

hab da wieder mal ein Problem. Ich soll diese Zeilen VB6 in C# Code umschreiben.

Nur leider geht das irgendwie nicht so wie ich das möchte.

string key "dfsf3f23";

...

Dim zw1 As String

Dim i1 As Integer

zw1 = ""

For i1 = 1 To Len(inpar)

zw1 = zw1 + Chr$(Asc(Mid$(inpar, i1, 1)) - (Asc(Mid$(key, i1, 1)) Mod 128))

Next i1

...

Einer eine Idee??? Soweit bin ich schon...

...

string zw1 = "";

for(int i1 = 1; i1 < strParam.Length; i1++)

{

zw1 = zw1 + Chr( Asc( strParam.Substring(i1, 1 ) ) - ( Asc( key.Substring(i1, 1) ) % 128) );

}

...

//Helper

public static byte Asc(char src)

{

return(System.Text.Encoding.GetEncoding("iso-8859-1").GetBytes(src + "")[0]);

}

public static byte Asc(string src)

{

return(System.Text.Encoding.GetEncoding("iso-8859-1").GetBytes(src + "")[0]);

}

public static char Chr(byte src)

{

return(System.Text.Encoding.GetEncoding("iso-8859-1").GetChars(new byte[] {src})[0]);

}

Danke

Encoding.UTF7

Habe aber auch hier kleine Unterschiede im Ergebnis. versuche gerade den Code in eine Vb.Net Dll zu packen. Mal schauen ob es ein anderes Ergebnis bringt.

So habe es hinbekommen, jetzt über eine Vb.Net Dll

THX

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.