As part of a challenge, a piece of code is given – Having issues trying to get it running as intended

Just a disclaimer up front, I don’t have a ton of coding experience – just enough to let me partially understand what’s happening in this code, but I’m struggling with how to arrive at the answer. This block of code (I think is C#, could be JS) was given as part of a CTF challenge… Read More As part of a challenge, a piece of code is given – Having issues trying to get it running as intended

Exception when converting base64 image to byte array

I have a base64 string that looks like this: data:image/png;base64,iVBORw0KGgoA…. And I need to convert the string to an image as byte array so I do: var b = Convert.FromBase64String(base64string); But I get an exception: System.FormatException: ‘The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding… Read More Exception when converting base64 image to byte array

The "==" operator with implicit type conversion. Why does it work only when I define implicit conversion inside A for A->B and not for B->A?

Here’s the code using System; public class WrappedInt { private int Value { get; } public WrappedInt(int value) { Value = value; } // Comparison in Main works when this is defined: public static implicit operator int(WrappedInt wInt) => wInt.Value; // But doesn’t work with this INSTEAD: // public static implicit operator WrappedInt(int value) =>… Read More The "==" operator with implicit type conversion. Why does it work only when I define implicit conversion inside A for A->B and not for B->A?

I just started with C#, following the freeCodeCamp.org tutorial, and I was wondering why this code doesn't work

my issues I can not use the ‘play’ button nor CTRL+f5. Why does it not let me play the code and open a console. I tried to open a console with the words "Hello World", but it doesn’t let me open up a console, at least I think. >Solution : Your solution has no projects.… Read More I just started with C#, following the freeCodeCamp.org tutorial, and I was wondering why this code doesn't work

I just started with C#, following the freeCodeCamp.org tutorial, and I was wondering why this code doesn't work

my issues I can not use the ‘play’ button nor CTRL+f5. Why does it not let me play the code and open a console. I tried to open a console with the words "Hello World", but it doesn’t let me open up a console, at least I think. >Solution : Your solution has no projects.… Read More I just started with C#, following the freeCodeCamp.org tutorial, and I was wondering why this code doesn't work