Differs from A in that B is more of a Portamento in sound. Whereas the slide, A, has no time value, B has more time value and you sound each note between the D and the G. Very similar to the Glassando. The speed at which you play it is pretty much left up to the player, but should really be played in keeping with the "feel" of the music. Different music scores show this type of ornamentation in different ways. some just have a dotted line with the sting number, and yes, you play the last note with it's proper value. The curved line that you see on the score tells you that all the notes should be played smoothly and that the last note should be sounded.
The C example we have already covered. You play the D then slide up to the G and play that for it's time value.
This is interesting and good practice for timing. You play the D then count for it's time value, for example, 1, 2 but if you can count evenly for the two counts it's better to count
"1 e and a," "2 e and a". on the last a, you play D again then quickly slide up to the G. Obviously you must keep in time with the rest of the tempo.
One thing that might confuse you in future is that not all scores will show the same notation for the same ornament but something different, it's all part of learning theory. But once you know how to approch reading music, as you are now, it becomes easier the more you do it.
So now you know how to read, the slide, the glissando, the grace notes and now, the portamento. It doesnt' matter on what lines or spaces they appear, they always mean the same thing. It's just a matter of getting used to seeing them and working it out. Practice, practice, practice
Hope this helps.