rgfirefly24's Profile User Rating: -----

Reputation: 296 Architect
Group:
Author w/DIC++
Active Posts:
1,537 (0.63 per day)
Joined:
07-April 08
Profile Views:
26,448
Last Active:
User is offline Yesterday, 01:47 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
AMD
Favorite Gaming Platform:
XBox
Your Car:
Chevrolet
Dream Kudos:
150

Latest Visitors

Icon   rgfirefly24 has not set their status

Posts I've Made

  1. In Topic: Invalid return type with Multicast Delegates

    Posted 23 Dec 2014

    where are you telling your delegate that it's void? try changing your delegate like so and see if it works:

    delegate void multicastDelegate(int number);
    
    


    Also, within your private method create an instance of the delegate, and do your thing to it. It should work fine after that:

    private void MulticastDelegates()
    {
        multicastDelegate _delegate = Add;
        _delegate += Multiply;
    
        //do your remaining work.
    
    }
    
    
    


    Doing it this way I come out with 14/7
  2. In Topic: SQL Class - with parameters?

    Posted 22 Dec 2014

    Repository is a design patter that uses classes and interfaces to house all of the Data access:

    ex:

    This is a repository for users
    
    public void SQLUsers: ISQLUsers
    {
        public User GetUser(string username, string encryptedPassword)
        {
            //do your data retrieval
        }
    }
    
    


    it implements an Interface which determines the contracts that the front end can make with the Data Access

    
    public Interface ISQLUsers
    {
        public User GetUser(string username, string encryptedPassword);
    
    }
    
    
    


    then in your front end code you can call it like so:

    
    ISQLUsers sql_users = new SQLUsers();
    
    var user = sql_users.GetUser(username,encryptedPassword);
    
    
    
  3. In Topic: Fall / Winter 2014 Fitness

    Posted 22 Dec 2014

    So, down from 343 to 322 as of today although I feel like I should have gained weight instead of losing it. I eat so often now (5-6 times a day) that it makes me wonder. I did realize that even though I eat more times a day, I eat less each time. Yesterday as our cheat we decided to get pizza, and I was full after just a single slice and 1 breadstick. Usually I'd have torn into 4-5 slices along with 2-3 breadsticks. I'm also eating a lot healthier, more fruits/veggies and less proccessed stuff. The only thing in our freezer now is raw meat.

    Slipped a little bit in my workouts, Normally I work out Sun, Mon, Tues, Thu, and Friday mornings for 30 minutes and then again Sun-Fri nights for 30 - 60 mins, but I've missed the last 4 night workouts and skipped the last 2 morning ones. I'm back into it now, with a new routine to hopefully make it less repetitive.

    I've added Yoga at the request of the Wife, so now twice a month I bend myself into positions that no human should ever be in. I would have to say that I probably get more of a workout from Yoga then I do from my normal workouts. I was dripping with sweat after just the warm-up.
  4. In Topic: SQL Class - with parameters?

    Posted 22 Dec 2014

    You would pass in the object you want to insert and the return type would be bool. You would return true if the insert happened, false if there was an issue.

    ex:

    
    public bool InsertNewUser(User user)
    {
        bool successful = false;
    
        try{ 
            //Do your thing here
            successful = true;
        }
        catch(SQLException sqlEX)
        {
            //throw the error to the user
        }
        
        return successful;
    
    }
    
    


    Also, I would highly suggest creating an Interface for your Repositories as that would allow your code to uncouple from the database layer. Basically what this means is that you can create as many different ways of handling Users, be it to SQL Server, Oracle, Mongo, etc. and you would not have to change the variable at all.

    ex:

    public class SQL_User: ISQLUser
    {
        //Do Stuff for SQL Server
    }
    
    


    //In your main class
    ISQLUser sql_user;
    
    public void MainClass()
    {
        sql_user = new SQL_User();
    }
    
    
    


    This allows you to easily switch what sql_user is, and also allows for Dependency Injection so that you can further uncouple your Layers.

    ex:
    public void MainClass(ISQLUser sqluser)
    {
        sql_user = sqluser;
    }
    
    
  5. In Topic: SQL Class - with parameters?

    Posted 20 Dec 2014

    you would roll a custom object to be returned, although a method should do one and only one thing so if the multiple sets of data are not connected you would want to break them out into different methods. It would be really helpful if you would show us what you've tried so far, as well as give us examples of what you are trying to do. From what I see from the snippet you created is that SQL_User is a static class with a GetUserID() method. That is not exactly what we were telling you. Have a look at this link: The Repository Pattern.

    I would also have a look at tlhIn`toq's Class tutorial.

My Information

Member Title:
D.I.C Lover
Age:
31 years old
Birthday:
February 21, 1983
Gender:
Years Programming:
4
Programming Languages:
C#, VB.NET, Javascript, VBScript

Contact Information

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

Comments

Page 1 of 1
  1. Photo

    AnalyticLunatic Icon

    06 Feb 2014 - 10:46
    Hey, congrats on the review/raise! Been offline a few days and just now reading through the threads. I've got a 90 day evaluation later this afternoon myself.
Page 1 of 1