« Test » : différence entre les versions
Apparence
Aucun résumé des modifications |
|||
Ligne 1 : | Ligne 1 : | ||
= highlight C# = | |||
<kode lang='cs'> | |||
using System.IO.Compression; | |||
namespace MyApplication | |||
{ | |||
interface IInterface { } | |||
class Program : IInterface | |||
{ | |||
/// <summary> | |||
/// Main method | |||
/// </summary> | |||
/// <param name="args"></param> | |||
static void Main(string[] args) | |||
{ | |||
// comment | |||
/* multi-lines | |||
* comment | |||
*/ | |||
Console.WriteLine($"Hello {Name}!"); | |||
if (b == true) | |||
{ | |||
// FIXME | |||
MyClass mc; | |||
MyClass mc = new MyClass(myVariable, MyProperty, myVariable.MyProperty); | |||
IMyInterface mi = MyClass<IMyInterface>.Create(new MyClass("test")); | |||
MyClass.MyStaticMethod(myVariable, MyProperty, myVariable.MyProperty); | |||
List<int> li = new List<int>() { 1, 2, 3 }; | |||
MyClass[] amc = new MyClass[] { 1, 2, 3 }; | |||
MyClass mc = mc; | |||
Myclass mc = mc; | |||
Type t = typeof(MyClass); | |||
Type t = typeof(IInterface); | |||
Type t = typeof(MyClass<int>); | |||
Type t = typeof(IInterface<int>); | |||
Type t = typeof(MyClass<IInterface>); | |||
DateTime d = new DateTime(); | |||
DateTime? d = null; | |||
var engine = new FileHelperAsyncEngine<DailyValue>(); | |||
Contract.Requires<ArgumentNullException>(argument != null); | |||
var un_objet = Session["clé"] as MaClasse; | |||
catch (Exception ex) | |||
{ | |||
lbStatus.Text = "Error: " + ex.Message; | |||
} | |||
} | |||
else if (b == false) | |||
{ | |||
var query = from p in entities.Persons | |||
select new { First = p.FirstName, Last = p.LastName }; | |||
} | |||
else | |||
{ | |||
MyProperty = "value"; | |||
MyMethod(myVariable, MyProperty, myVariable.MyProperty); | |||
} | |||
foreach (MyClass<int> mc in mcList) | |||
{ | |||
} | |||
foreach (MyClass mc in mcList) | |||
{ | |||
} | |||
using (GZipStream s = new GZipStream(fs, CompressionMode.Decompress)) | |||
{ | |||
} | |||
} | |||
[DataMember("")] | |||
private List<int> MyMethod(MaClasse mc, MaClasse<int> mci, IInterface ii, MaClasse<MaClasse> mcmc) | |||
{ | |||
} | |||
public void Methode(DateTime date1 = default(DateTime), DateTime? date2 = null) | |||
{ | |||
if (date1 == default(DateTime)) date1 = new DateTime(...); | |||
if (date2 == null) date2 = new DateTime(...); | |||
} | |||
} | |||
} | |||
</kode> | |||
= [[Modèle_MediaWiki|liens+]] = | = [[Modèle_MediaWiki|liens+]] = | ||
* [http://www.meteofrance.com/previsions-meteo-france/ferney-voltaire/01210 meteo] | * [http://www.meteofrance.com/previsions-meteo-france/ferney-voltaire/01210 meteo] |
Version du 1 avril 2020 à 20:06
highlight C#
using System.IO.Compression;
namespace MyApplication
{
interface IInterface { }
class Program : IInterface
{
/// <summary>
/// Main method
/// </summary>
/// <param name="args"></param>
static void Main(string[] args)
{
// comment
/* multi-lines
* comment
*/
Console.WriteLine($"Hello {Name}!");
if (b == true)
{
// FIXME
MyClass mc;
MyClass mc = new MyClass(myVariable, MyProperty, myVariable.MyProperty);
IMyInterface mi = MyClass<IMyInterface>.Create(new MyClass("test"));
MyClass.MyStaticMethod(myVariable, MyProperty, myVariable.MyProperty);
List<int> li = new List<int>() { 1, 2, 3 };
MyClass[] amc = new MyClass[] { 1, 2, 3 };
MyClass mc = mc;
Myclass mc = mc;
Type t = typeof(MyClass);
Type t = typeof(IInterface);
Type t = typeof(MyClass<int>);
Type t = typeof(IInterface<int>);
Type t = typeof(MyClass<IInterface>);
DateTime d = new DateTime();
DateTime? d = null;
var engine = new FileHelperAsyncEngine<DailyValue>();
Contract.Requires<ArgumentNullException>(argument != null);
var un_objet = Session["clé"] as MaClasse;
catch (Exception ex)
{
lbStatus.Text = "Error: " + ex.Message;
}
}
else if (b == false)
{
var query = from p in entities.Persons
select new { First = p.FirstName, Last = p.LastName };
}
else
{
MyProperty = "value";
MyMethod(myVariable, MyProperty, myVariable.MyProperty);
}
foreach (MyClass<int> mc in mcList)
{
}
foreach (MyClass mc in mcList)
{
}
using (GZipStream s = new GZipStream(fs, CompressionMode.Decompress))
{
}
}
[DataMember("")]
private List<int> MyMethod(MaClasse mc, MaClasse<int> mci, IInterface ii, MaClasse<MaClasse> mcmc)
{
}
public void Methode(DateTime date1 = default(DateTime), DateTime? date2 = null)
{
if (date1 == default(DateTime)) date1 = new DateTime(...);
if (date2 == null) date2 = new DateTime(...);
}
}
}
|
liens+
ini
Fichier:Ini.svg | [section]
cle = valeur
# comment
// comment
; comment
|
listes
- un
- deux
- trois
- deux
- dix
- trente
- un
- deux
- 22
- trois
- plus
- plus
- moins
- moins
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
- un
- deux
- trois
Code xxx
test.ps1 |
# Renforce les règles de vérification et créé une erreur si elles ne sont pas respectées
Set-StrictMode -Version Latest
# Stop le script à la première erreur (par défaut à Continue)
$ErrorActionPreference = "Stop"
# Force tous les Cmdlet à s'arrêter à la première erreur
$PSDefaultParameterValues['*:ErrorAction']='Stop'
|
# Renforce les règles de vérification et créé une erreur si elles ne sont pas respectées
Set-StrictMode -Version Latest
# Stop le script à la première erreur (par défaut à Continue)
$ErrorActionPreference = "Stop"
# Force tous les Cmdlet à s'arrêter à la première erreur
$PSDefaultParameterValues['*:ErrorAction']='Stop'
|
k = 10;
|
k = 10;
|
# Titre 1
## Titre 2
|
# Titre 1
## Titre 2
|
class MyClass {
public static myValue: string;
constructor(init: string) {
this.myValue = init;
}
}
import fs = require("fs");
module MyModule {
export interface MyInterface extends Other {
myProperty: any;
}
}
declare magicNumber number;
myArray.forEach(() => { }); // fat arrow syntax
|
test.ts |
class MyClass {
public static myValue: string;
constructor(init: string) {
this.myValue = init;
}
}
import fs = require("fs");
module MyModule {
export interface MyInterface extends Other {
myProperty: any;
}
}
declare magicNumber number;
myArray.forEach(() => { }); // fat arrow syntax
|
SVG
Liens
- web http xxx
- web https xxx
- Local https xxx
<% xxx %> |
Excel
=Format(Fields!date.Value,"dddd dd/MM/yyyy")
|
=Format(Fields!date.Value,"dddd dd/MM/yyyy")
|
Fichier:Excel.svg | =Format(Fields!date.Value,"dddd dd/MM/yyyy")
|
Autres
Test 222