Autor Beitrag
JoKaBo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157



BeitragVerfasst: So 27.11.11 19:49 
Halllllllllo,

Ich weiss ich hatte schonmahl ein anliches topic aber gut

also:

ich will halt meine console anwendung passwort schützen.

ich wollte es grade nem freund zeigen da habe ich das alles irgend wie vergessen weil es mich so verwird hatte xD

also ich wollte es so machen

ausblenden C#-Quelltext
1:
2:
3:
if (Console.ReadLine = "")
            {
            }


ich weiss das das net richtig sein kann aber ich weiss net was das richtige wäher hm.. bin wohl aufen kopf gefallen xD

mfg
JoKaBo
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 27.11.11 19:50 
Wie lautet nochmal der Vergleichsoperator in C#?
JoKaBo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 157



BeitragVerfasst: So 27.11.11 20:09 
also

ausblenden C#-Quelltext
1:
2:
3:
if (Console.ReadLine == "")
            {
            }


Das geht aber auch net xD
Trashkid2000
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 561
Erhaltene Danke: 137



BeitragVerfasst: So 27.11.11 20:14 
Es heißt ja auch "Console.ReadLine();"
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 27.11.11 20:20 
Denn:
ReadLine ist eine Methode und keine Eigenschaft.
Trashkid2000
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 561
Erhaltene Danke: 137



BeitragVerfasst: So 27.11.11 22:20 
user profile iconJoKaBo hat folgendes geschrieben Zum zitierten Posting springen:
.. bin wohl aufen kopf gefallen xD
Ich äußere mich jetzt nicht dazu ... SCNR :)
Aber hältst Du eine Passwortabfrage, bei der das Passwort string.Empty ist für sinnvoll?
Oder besser gesagt: was erwartest Du überhaupt von dem "Passwortschutz"?
Jeder halbwegst normale .NET-Entwickler weiß, wie man so einen "Schutz" aushebeln kann.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 27.11.11 22:52 
Da man C#-Programme 1:1 einfach dekompilieren kann, sind Ansätze wie dieser ohnehin lächerlich für jeden, der auch nur ein wenig Ahnung in der Richtung hat. Aber ich habe nicht den Eindruck, dass die "Sicherheit" hier relevant ist. ;-)