Skip to content

Instantly share code, notes, and snippets.

View udawtr's full-sized avatar

Wataru Uda udawtr

View GitHub Profile
@udawtr
udawtr / C deserialization.cs
Created March 5, 2012 01:19 — forked from ivasilov/C deserialization.cs
XML serialization
public Person Deserialize(string file)
{
XmlSerializer serializer = new XmlSerializer(typeof(Person));
Stream reader = new FileStream("C:\\myXmFile.xml", FileMode.Open);
Person temp=(Person)serializer.Deserialize(reader);
reader.Close();
return temp;
}
@udawtr
udawtr / GoogleAnalyticsApi.cs
Created June 25, 2018 00:40 — forked from 0liver/GoogleAnalyticsApi.cs
C# wrapper around the Google Analytics Measurement Protocol API
/* based on the docs at: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide */
/*
* LICENSE: MIT
* AUTOHR: [email protected]
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;