CodeCanyon

Windows Registry Classes

I have my own class named MyClass, how do I store objects of that type to Registry using your classes?

The first step is making your class serializable, which is very easy. Simply add the string “[Serializable]” on top of your class definition, like so:

using System.Something;

namespace SomeNamespace
{
    [Serializable]
    public class MyClass
    {
        ...
    }
}

Next step is to create an instance of the CoreRegistry class

CoreRegistry reg = new CoreRegistry("MyProgram", "MyCompany");

And with this reg object you get and set objects of type MyClass in Registry:

MyClass mycls = new MyClass();
reg.SetObject("NameOfKey", mycls);

mycls = null;
mycls = (MyClass)reg.GetObject("NameOfKey");

You must sign in or sign up to purchase this item.

$20Regular Licence

$20

Regular Licence a website (commercial, personal, client), or intranet site project - Details

$100Extended Licence

$100

Extended Licence a website template for sale (including on ThemeForest or ActiveDen) - Details

3 Purchases 6 Comments

Buyer Rating
Minimum of 3 votes required
for Rating
steinikallinn

steinikallinn

  • Has been a member for 1-2 years
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 1 and 9 items
  • Iceland
  • Referred between 1 and 9 users
View Portfolio
Created 29 March 10
Compatible Browsers Chrome 4, Chrome 5, FireFox 2, FireFox 3, IE6, IE7, IE8, Opera, Safari
Software Version .Net 3.5
Files Included C# CS
by
by
by
by
by