I tried to upgrade my Visual Studio 2017 RC to the release version and got an error product definitions failed to load
The way I got the installer to work was to delete the folder %LocalAppData%\Microsoft\VisualStudio\Packages\
After that running the installer I was able to update my install to the released version
Wednesday, March 8, 2017
Sunday, March 5, 2017
Cloning an Object in an PCL
Here is an example on how to clone an object in a portable class library
I am using Json.net to help. Add the Json.Net nuget package to any project in the solution that uses the PCL
public T CloneObject<T>(T toBeCloned)
{
T clone = default(T);
string serialized = JsonConvert.SerializeObject(toBeCloned);
clone = JsonConvert.DeserializeObject<T>(serialized);
return clone;
}
I am using Json.net to help. Add the Json.Net nuget package to any project in the solution that uses the PCL
Then you an serialize the object into Json and then deserialize it right away to create a clone of a object
public T CloneObject<T>(T toBeCloned)
{
T clone = default(T);
string serialized = JsonConvert.SerializeObject(toBeCloned);
clone = JsonConvert.DeserializeObject<T>(serialized);
return clone;
}
Subscribe to:
Posts (Atom)
-
If you have the Anniversary update windows 10 pro or greater you can enable long file names in group policy. Search for group policy edit...
-
I find that sometime when I am debugging a Xamarin Forms apps on a windows 10 machine the android apps do not show the latest updates in the...
-
I have been wanting to learn how to develop software for Linux for a while. Now that Microsoft is has been making .net core work cross plat...

