Comparación entre lenguajes usando: namespace, static method, instance, callback, enum y types
namespace Core.Utils
{
public static class HttpUtil
{
public static Byte[] Download(Url url)
{
using (var client = new HttpClient())
{
return client.DownloadData(url);
}
}
}
}
enum opers
{
cancell,
buy,
sell
}
namespace Core.Utils
{
abstract class HttpUtil
{
public static Download(url: Url): Byte[]
{
return ((client = new HttpClient()) =>
{
return client.DownloadData(url)
})()
}
}
}
enum opers
{
cancell,
buy,
sell
}
// --------------------------------------------
class HttpClient {
public DownloadData(url: Url): Byte[] {
return
}
}
type Url = string
type Byte = number