Click here to Skip to main content
15,881,852 members
Home / Discussions / C#
   

C#

 
QuestionWhich object's destructor is getting called in vector? Pin
_PitrakSarkar_9-Dec-19 1:59
_PitrakSarkar_9-Dec-19 1:59 
SuggestionRe: Which object's destructor is getting called in vector? Pin
Richard Deeming9-Dec-19 2:06
mveRichard Deeming9-Dec-19 2:06 
AnswerRe: Which object's destructor is getting called in vector? Pin
Richard MacCutchan9-Dec-19 3:56
mveRichard MacCutchan9-Dec-19 3:56 
QuestionWrite program Wpf C# calculator (OEE ) Pin
Member 146803725-Dec-19 21:39
Member 146803725-Dec-19 21:39 
QuestionRe: Write program Wpf C# calculator (OEE ) Pin
Richard MacCutchan5-Dec-19 22:32
mveRichard MacCutchan5-Dec-19 22:32 
AnswerRe: Write program Wpf C# calculator (OEE ) Pin
OriginalGriff5-Dec-19 22:41
mveOriginalGriff5-Dec-19 22:41 
AnswerRe: Write program Wpf C# calculator (OEE ) Pin
Crimson1st24-Jan-22 13:18
Crimson1st24-Jan-22 13:18 
QuestionC# Passing password to Web API Pin
Kevin Marois5-Dec-19 9:00
professionalKevin Marois5-Dec-19 9:00 
Working on a WPF app that hit's a Web API.On the server, I have this code in my BizObject:
public UserEntity Login(CredentialsEntity credentials)
{
    var user = _repository.GetUser(credentials.UserName);

    if (user != null)
    {
        if (Cryptology.CompareHashedString(user.Password, credentials.Password))
        {
            if (user.CanLogIn.HasValue && user.CanLogIn.Value)
            {
                return user;
            }
        }
    }

    return null;
}
While it works, the Password on the Credential object (credentials.Password) is in plain text. I know this isn't right, but I'm not sure of the correct way to do this?

What's the right way here?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: C# Passing password to Web API Pin
Richard Deeming5-Dec-19 9:06
mveRichard Deeming5-Dec-19 9:06 
QuestionNaudio C# ASP.net Using MPG Video Pin
Member 1394308729-Nov-19 23:45
Member 1394308729-Nov-19 23:45 
AnswerRe: Naudio C# ASP.net Using MPG Video Pin
Gerry Schmitz2-Dec-19 5:15
mveGerry Schmitz2-Dec-19 5:15 
AnswerRe: Naudio C# ASP.net Using MPG Video Pin
jkirkerx2-Dec-19 9:30
professionaljkirkerx2-Dec-19 9:30 
QuestionDrawString with opacity option not print properly Pin
Le@rner29-Nov-19 19:19
Le@rner29-Nov-19 19:19 
AnswerRe: DrawString with opacity option not print properly Pin
OriginalGriff29-Nov-19 20:17
mveOriginalGriff29-Nov-19 20:17 
GeneralRe: DrawString with opacity option not print properly Pin
Le@rner29-Nov-19 20:28
Le@rner29-Nov-19 20:28 
AnswerRe: DrawString with opacity option not print properly Pin
OriginalGriff29-Nov-19 21:16
mveOriginalGriff29-Nov-19 21:16 
GeneralRe: DrawString with opacity option not print properly Pin
Le@rner29-Nov-19 21:23
Le@rner29-Nov-19 21:23 
GeneralRe: DrawString with opacity option not print properly Pin
OriginalGriff29-Nov-19 21:29
mveOriginalGriff29-Nov-19 21:29 
GeneralRe: DrawString with opacity option not print properly Pin
Le@rner29-Nov-19 21:30
Le@rner29-Nov-19 21:30 
GeneralRe: DrawString with opacity option not print properly Pin
OriginalGriff29-Nov-19 21:30
mveOriginalGriff29-Nov-19 21:30 
GeneralRe: DrawString with opacity option not print properly Pin
Le@rner29-Nov-19 21:35
Le@rner29-Nov-19 21:35 
GeneralRe: DrawString with opacity option not print properly Pin
OriginalGriff29-Nov-19 21:41
mveOriginalGriff29-Nov-19 21:41 
GeneralRe: DrawString with opacity option not print properly Pin
Le@rner29-Nov-19 22:06
Le@rner29-Nov-19 22:06 
GeneralRe: DrawString with opacity option not print properly Pin
OriginalGriff29-Nov-19 22:33
mveOriginalGriff29-Nov-19 22:33 
GeneralRe: DrawString with opacity option not print properly Pin
OriginalGriff29-Nov-19 22:39
mveOriginalGriff29-Nov-19 22:39 

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.