hawksprite's Profile User Rating: -----

Reputation: 7 Worker
Group:
Contributors
Active Posts:
137 (0.08 per day)
Joined:
11-September 09
Profile Views:
6,377
Last Active:
User is offline Jul 11 2013 07:39 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
125

Latest Visitors

Icon   hawksprite has not set their status

Posts I've Made

  1. In Topic: C# message box and timer

    Posted 25 May 2013

    View PostToadill, on 25 May 2013 - 04:24 PM, said:

    Here I will get you started

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    
    namespace test2
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void Form1_Load(object sender, EventArgs e)
            {
              //What goes here on the form load event?
            }
        }
    }
    
    


    That lowercase namespace is really bugging me.

    Fixed:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    
    namespace HomeworkDialogbox
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void Form1_Load(object sender, EventArgs e)
            {
              //What goes here on the form load event?
            }
        }
    }
    
    
  2. In Topic: Starting a System Restore

    Posted 11 Feb 2013

    View Postandrewsw, on 11 February 2013 - 10:49 PM, said:

    See this page - although it refers to XP (and VBScript) it is still relevant.

    VBScript
    Set SRP = getobject("winmgmts:\\.\root\Default:SystemRestore")
    eSRP = SRP.Restore(22) 'parameter passed is the sequence number of 
    'the restore point you want to roll back to
    

    It uses GetObject() but I assume there is a corresponding WMI class that you can track down. Added: here you go

    Erm, I assume you have a spare laptop to test this on :whistling:/>


    Thanks a ton. And i'm using a VM to test it out.
  3. In Topic: Casting Issue

    Posted 28 Oct 2012

    View PosttlhIn`toq, on 28 October 2012 - 08:46 PM, said:

    Ewwww.... Tool generated coding... Get it off me... get it off me....


    Haha yeah it's not the greatest but it saves me a good bit of time and frustration.

    View PostAdamSpeight2008, on 28 October 2012 - 09:38 PM, said:

    Integer? is shorthand for Nullable<Integer>. Since value type always have a value, how do you represent the absence of a value? This where nullable come in.
    Reference type can express the absence of a reference with null.
    But this leads to an issue that null maybe a valid state, so this often leads to creating of MayBe<T> or Option<T> type .


    Thanks for the info I was attempting to make a Class<T> at one point but I was just doing something wrong so I ended up going with the solution I posted about earlier.
  4. In Topic: Casting Issue

    Posted 28 Oct 2012

    I probably should have structured the rootobject's better in the first place to handle it.

    The classes themselves were actually generated with this:
    http://json2csharp.com/

    Thanks for your help with the problem, much appreciated.
  5. In Topic: Casting Issue

    Posted 28 Oct 2012

    I think I found a solution here's what I did.

    I desiralized it all into just objects like before.

    Then I think the objects like this
                  if (input.image != null)
                  {
                   // result.image = (Image)input.image;
                    result.image = JsonConvert.DeserializeObject<Image>(JsonConvert.SerializeObject(input.image));
                }
    
    


    Sorry if the format is bad, basically it looks at the object and if it's not null it converts it back to raw JSON then back into the actual object. This way it's only casting to the real object if there's data in the JSON response.

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Years Programming:
5

Contact Information

E-mail:
Click here to e-mail me
Website URL:
Website URL  http://hawksprite.com

Friends

Comments

hawksprite has no profile comments yet. Why not say hello?