This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Net.Http; | |
using System.Net; | |
namespace HTTP_Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string address = "https://www.google.com/webhp?hl=fil&sa=X&ved=0ahUKEwiC9fW2rtziAhWGF4gKHeYaC6kQPAgH"; | |
Uri uriGoogle = new Uri(address); | |
PrintInfo(uriGoogle); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# start of block comment | |
Why powershell? | |
* it object oriented | |
* rich script environment | |
* bulk operations | |
* interactive shell | |
* task automation | |
* use of consistent, repetable task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ConsoleApp1 | |
{ | |
public interface IEmployee | |
{ | |
void DefaultRecords(); | |
} | |
public enum Benefit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Console.WriteLine("What's your name?"); | |
var name = Console.ReadLine(); | |
Console.WriteLine(string.Format("Hello {0}!!", name)); | |
} | |
[Test] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ExploreDictionaryListComparison | |
{ | |
public enum ServerConnection | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"planet": "Mercury", | |
"moons": 0, | |
"diameter": 4879, | |
"distanceFromSun": 57.9 | |
}, | |
{ | |
"planet": "Venus", | |
"moons": 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void Test_GetAll_BuiltIn_Attributes() | |
{ | |
var assembly = Assembly.Load(assemblyFullName); | |
var attributes = assembly | |
.DefinedTypes | |
.Where(type => | |
type | |
.IsSubclassOf(typeof(Attribute))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
namespace CSharp_Attributes_Walkthrough.My_Custom_Attributes | |
{ | |
[Serializable] | |
public class Product | |
{ | |
public string Name { get; set; } | |
public string Code { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fact] | |
public void Test_Read_Attributes() | |
{ | |
//get the Product-class | |
var type = typeof(Product); | |
//Get the attributes of the Product-class and we are expecting the [Serializable] | |
var attribute = (SerializableAttribute)type. | |
GetCustomAttributes(typeof(SerializableAttribute), false).FirstOrDefault(); |
OlderNewer