C# Reflection Explained (Claim generation example)

Поділитися
Вставка
  • Опубліковано 15 лис 2024

КОМЕНТАРІ • 93

  • @danielkrajnik3817
    @danielkrajnik3817 2 роки тому +38

    I miss dislike button

    • @RawCoding
      @RawCoding  2 роки тому +24

      Like this comment to dislike

    • @danielkrajnik3817
      @danielkrajnik3817 2 роки тому +11

      @@RawCoding simple explanation that worked for me is that reflection is just reading a section of metadata, which .NET adds to compiled assemblies

    • @danielkrajnik3817
      @danielkrajnik3817 2 роки тому +14

      having this comment pinned is the real self-reflection

    • @RawCoding
      @RawCoding  2 роки тому +8

      Thank you for sharing an explanation that clicked for you

    • @gitgudsec
      @gitgudsec 9 місяців тому +2

      subbed just cause you pinned this comment, a man with intellectual humility.

  • @evrame.microwize
    @evrame.microwize 2 роки тому +14

    Thank you very much for the time and effort you put for people to learn. Obviously not a lot of people understand how hard it is to acquire the knowledge you have digested and shared to the community in such a great way. Again, thanks and keep up the awesome work!

  • @vladm6892
    @vladm6892 4 роки тому +7

    Always wanted to take a closer look into reflection. I will take a look at the video later today, thanks for posting!

  • @shanksatutube
    @shanksatutube 4 роки тому +6

    Hi, Thanks Anton for all the awesome content on your channel. Which LinqPad extension did you use for ConvertTo() ? Also, how did you gain some much knowledge in C#? any recommendations ?

    • @RawCoding
      @RawCoding  4 роки тому +3

      public static T ConvertTo(this string @this) => JsonSerializer.Deserialize(@this);
      and just practice :)

    • @shanksatutube
      @shanksatutube 4 роки тому

      @@RawCoding thanks dude

  • @distinguishedmoments2277
    @distinguishedmoments2277 2 роки тому +1

    Dude. That pad is Amazing. Scoping into classes looks very nice. Good job sharing that

  • @joshuawiley6506
    @joshuawiley6506 4 роки тому +4

    Amazing, I gel with your vibe. thanks dude. I appreciate it.

  • @marsdriver2501
    @marsdriver2501 Рік тому +1

    literally Charlie the moist critical, but a programming youtuber

  • @IvanKriuchkov
    @IvanKriuchkov 3 роки тому +4

    Dude, awesome video... One of that moments that resets your self-estimation as a programmer back to a first-grader

    • @RawCoding
      @RawCoding  3 роки тому +1

      Haha yea I don’t think that ever stops

    • @IvanKriuchkov
      @IvanKriuchkov 3 роки тому

      @@RawCoding for sure)

  • @B4RN154N
    @B4RN154N 3 роки тому +2

    This was really eye opening for me. Thank you very much sir!

    • @RawCoding
      @RawCoding  3 роки тому

      Thank you for watching))

  • @swapnilpakolu5817
    @swapnilpakolu5817 2 роки тому

    This is so great!! I am going to add to watchlist to watch it again...

  • @alkiro_ra
    @alkiro_ra Рік тому +1

    Bruh. I'm too dump() for this

  • @abuzeromohammed3386
    @abuzeromohammed3386 4 роки тому +7

    hi thank you for this but could you please make full tutorial on lamda, func, ,anonymous method and event

  • @ProManKuba
    @ProManKuba 2 роки тому +1

    Damn, when excatly are you explaining what is the reflection? I watched the whole video carefully and I feel like I missed something because it ended and I still don't know what the reflection is exactly :/

    • @RawCoding
      @RawCoding  2 роки тому

      Code is data, you’ve written a program and there is data you can extract from you program. Reflection is reading data about your program at runtime.

  • @LarryPeteet
    @LarryPeteet 4 роки тому +1

    Watched a couple of your videos and Subscribed just now!

  • @nonameiskickass1319
    @nonameiskickass1319 3 роки тому +2

    real genius indeed

  • @timmayabi7734
    @timmayabi7734 2 роки тому

    Hi, I'm getting this error "CS1061 'string' does not contain a definition for 'ConvertTo'"

  • @SpicyMelonYT
    @SpicyMelonYT 3 роки тому +2

    Ok that intro and that phrasing was literally all I needed to immediately know that this was gonna be a great explanation. Its like you can read my mind in the beginning wth.
    Edit: After watching it all I was genuinely shocked at the similarities of how our minds work. I explain things just like you do and now I realize why people find it hard to understand me sometimes haha. I understood you though. Your explanation was basically 80% abstract thought and 20% communicational conventions (i.e. what we all agree on when we say words). I really wish there was a way to just send abstract thought over to someone else instead of trying to compress it down into words.

    • @RawCoding
      @RawCoding  3 роки тому +1

      Really appreciate your comment thank you 🙏

  • @vasugupta1
    @vasugupta1 4 роки тому +1

    Very informative video, cheers for creating them

    • @RawCoding
      @RawCoding  4 роки тому

      Thank you for watching:)

  • @mohamedfared9659
    @mohamedfared9659 3 роки тому +1

    thanks man for great video

  • @parsalotfy
    @parsalotfy 3 роки тому +1

    Amazing videos, thank you

    • @RawCoding
      @RawCoding  3 роки тому

      Thank you for watching

  • @LarryPeteet
    @LarryPeteet 4 роки тому +1

    14:45 I downloaded your code and it compiles. When I try the Startup(null) like you show it cannot find Startup. I added the WebApp.dll from Bin folder but it doesn't see any namespaces there.

    • @RawCoding
      @RawCoding  4 роки тому

      If you don’t have a payed version of LinqPad you need to add the namespace manually, press f4 and it’ll be there

    • @LarryPeteet
      @LarryPeteet 4 роки тому +1

      @@RawCoding Thanks I had tried that but my problem was I was not using LINQPad as your project is DotNet Core. Just got it working and continuing with video, Kindly!

    • @RawCoding
      @RawCoding  4 роки тому +1

      Ah alright

    • @LarryPeteet
      @LarryPeteet 4 роки тому

      @@RawCoding meant to say I wasn't running LINQPad 6. I bought the ultimate edition

  • @caglarcansarikaya1550
    @caglarcansarikaya1550 2 роки тому +1

    Bro thanks for tour :) that was great, ı wonder about it was a show how we can do with reflection or it was a real scenario, I came here because I am looking something in reflection I would like put many of strings into one string with reflection, like property names are name1,name2, name3.. I dont know how much it is, when I read this from excel, I have to put all that to one list names

    • @RawCoding
      @RawCoding  2 роки тому

      Sorry I don’t quite understand

    • @caglarcansarikaya1550
      @caglarcansarikaya1550 2 роки тому +1

      Haha me too :) I dont know what I was trying to say, but I wonder about the auth claim with reflection is really needed or it is a show to see what we will do with using reflection

    • @RawCoding
      @RawCoding  2 роки тому

      It’s a demonstration

    • @caglarcansarikaya1550
      @caglarcansarikaya1550 2 роки тому

      @@RawCoding Okey, thanks for it. Reflection is really interesting :)

  • @rakshithnsachar1270
    @rakshithnsachar1270 2 роки тому +2

    I wish I could have a tutor like you. Thank you for the work ur putting into.

    • @RawCoding
      @RawCoding  2 роки тому +1

      Thank you for watching

  • @Eddyi0202
    @Eddyi0202 2 роки тому +1

    Another great video, thanks for this! One thing is that I guess you could set "inherit" parameter to true of "GetCustomAttribute()" in order to get that "Authorize" attribute from the controller itself, instead of adding " || x.DeclaringType.GetCustomAttribute(authAttr) != null)".

  • @Antonio-lt1sp
    @Antonio-lt1sp 3 роки тому +1

    This method .dump does not appear to me. What am I missing?

  • @paulofernandoee
    @paulofernandoee 2 роки тому

    Awsome video, thanks

  • @tracetv8115
    @tracetv8115 4 роки тому +3

    Great work and thank u so much for ur work! A video about marshaling would be nice.

    • @RawCoding
      @RawCoding  4 роки тому +1

      Haven’t done it before so I need to try it first :)

  • @dennispitadeniya2479
    @dennispitadeniya2479 8 місяців тому

    Good one brother

  • @kyreehenry9202
    @kyreehenry9202 2 роки тому

    Can this be achieved with razor pages

  • @paulsanchez5030
    @paulsanchez5030 2 роки тому +1

    IMO, i mean when Reflection does click for you, this video will make more sense.

    • @RawCoding
      @RawCoding  2 роки тому

      what would you say is missing from this video?

  • @charlesoto2
    @charlesoto2 2 роки тому +1

    Why so many "\" in that json format?

    • @RawCoding
      @RawCoding  2 роки тому

      that's what json is gotta escape the " to not close of the string

  • @jimh3595
    @jimh3595 6 місяців тому

    Good stuff.

  • @sanjayi6245
    @sanjayi6245 4 роки тому +1

    Please make a video on Reflection.Emit if possible

    • @RawCoding
      @RawCoding  4 роки тому

      I never used it so I can't sorry :)

  • @ricardothomas3779
    @ricardothomas3779 4 роки тому +2

    Awesome Anton.
    Thank you.
    #professorrawcoding
    #raw_coding

    • @RawCoding
      @RawCoding  4 роки тому +1

      Cheers :) Remember that thing I was talking about automatically generating claims? This is basically it

    • @ricardothomas3779
      @ricardothomas3779 4 роки тому +2

      @@RawCoding Yes I remember.
      Trust me, in time you/raw_coding is going to be the goto for all developers using the development stack that you have knowledge of.
      You will soon have no time for yourself : )

    • @ricardothomas3779
      @ricardothomas3779 4 роки тому +2

      @@RawCoding "Remember that thing I was talking about automatically generating claims?" Yes I remember very well.

    • @hacao2739
      @hacao2739 4 роки тому +2

      @@ricardothomas3779 I second that

  • @marsdriver2501
    @marsdriver2501 Рік тому

    seems like getting project for a Coursework that involves reflection wasn't the best idea

  • @xieweiling7543
    @xieweiling7543 3 роки тому +1

    Jeepers, is it like kind of hacker or reverse engineer?

    • @RawCoding
      @RawCoding  3 роки тому

      Nope, it’s code as data

  • @LarryPeteet
    @LarryPeteet 4 роки тому +1

    They way you typed it doesn't work for me. I had to use Single Quotes in the Split Parameter.
    "Hello World".Split(' ').Dump();

  • @Raveyboi
    @Raveyboi 3 роки тому +1

    They call him Jesus of Programming xD

  • @batek34
    @batek34 7 місяців тому

    Great explanation, but maybe write a script beforehand; this video could have been half of what it was.

  • @mac19999x
    @mac19999x 4 роки тому +2

    Where are you from? Your English is very good, but it sounds as a second language. Like something one would be taught at school.

  • @vetald1979
    @vetald1979 4 роки тому +1

    Nice haircut

  • @jorgellanque7704
    @jorgellanque7704 Рік тому

    Crack

  • @trudyreiser8075
    @trudyreiser8075 6 місяців тому

    You go way too fast