Wednesday, August 9, 2023

 

Code2Know


Boxing and Unboxing

Conversion of the value type to the reference type is known as boxing - implicit

V > O 
int v = 1; object o = v;

Converting the reference type back to the value type is known as unboxing - explicit

O > V
object o = 5; int v = (int) o;

CLR boxes a value type, it wraps the value inside a System.Object instance and stores it on the managed heap. 

HTTP Requests

 

HTTP methods,

It's good to know at least 9/39 of these methods:


GET Method: Gets data from a server.

POST Method: Sends data to a server to create something new.

PUT Method: Changes something that's already on a server.

PATCH Method: Changes part of something on a server.

DELETE Method: Removes something from a server.

HEAD Method: Gets information about something on a server.

OPTIONS Method: Tells you how you can interact with something on a server.

TRACE Method: This shows the path of communication between you and the server.

CONNECT Method: This makes a special kind of connection to a server.



Reference