Skip to content

Instantly share code, notes, and snippets.

View jgiacomini's full-sized avatar
🎯
Focusing

Jérôme GIACOMINI jgiacomini

🎯
Focusing
View GitHub Profile
@thomaslevesque
thomaslevesque / CSharpErrorsAndWarnings.md
Last active April 11, 2024 21:35
All C# errors and warnings. NOTE: this list is out of date. See https://github.com/thomaslevesque/GenerateCSharpErrors/blob/master/CSharpErrorsAndWarnings.md for a more recent version

All C# errors and warnings

Parsed from the Roslyn source code using Roslyn.

Code Severity Message
CS0006 Error Metadata file '{0}' could not be found
CS0009 Fatal Metadata file '{0}' could not be opened -- {1}
CS0012 Error The type '{0}' is defined in an assembly that is not referenced. You must add a reference to assembly '{1}'.
CS0016 Error Could not write to output file '{0}' -- '{1}'
@YARG
YARG / gist:2b9a50abc9c3524d40fc
Last active January 15, 2020 14:15
C#/Xamarin Android - Converts a UTC DateTime to the device local Time Zone as System.DateTime. Also includes functions to convert Android native date times to System.DateTime and back again.
/// <summary>
/// Converts a UTC datestamp to the local timezone
/// </summary>
/// <returns>The UTC to local time zone.</returns>
/// <param name="dateTimeUtc">Date time UTC.</param>
public DateTime ConvertUTCToLocalTimeZone(DateTime dateTimeUtc) {
// get the UTC/GMT Time Zone
Java.Util.TimeZone utcGmtTimeZone = Java.Util.TimeZone.GetTimeZone ("UTC");