Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
O

onetreeup

@onetreeup
About
Posts
15
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MS CRM 4.0 - SQL Reporting Services
    O onetreeup

    I have fields in my report that are picklists, how can I set the the value of the field to display the string value?

    C# question database

  • error using float for array to string
    O onetreeup

    The following: float.m_result = float.Parse(m_store[0].ToString()); is generating an error: 'float' does not contain a definition for 'm_result'. The .net help message is: 'type' does not contain a definition for 'identifer' Not sure which direction I need here. I am new to c#, appreciate help. Thanks

    C# csharp help data-structures

  • Type /Namespace error in code
    O onetreeup

    I already had the using System.Collections.Generic; but added the using System.Collections; The errors I am getting are that: m_value does not exist in current context m_store does not exist in current context

    C# data-structures json help question

  • Type /Namespace error in code
    O onetreeup

    The only code I had in the Designer.cs file was: private string m_value; private ArrayList mstore; The rest of the code is in the is in the Calculator.cs file. So now I have made the change: private string m_value; private List; m_store; // moving the declarations to the cs. file public Calculator() { InitializeComponent(); m_value = ""; m_store = new List(); } When I remove the values above, the private calls, I get even more errors. Is using partial classes possibly causing my errors? The code was original in a publ class.

    C# data-structures json help question

  • Type /Namespace error in code
    O onetreeup

    I have code for a calculator, and continue to get an error that I cannot seem to find. The error: The type or namespace name 'ArrayList' could not be found(are you missing a using directive or an assembly reference) I have partial classes, delaring the following in the Calculator.Designer.cs private string m_value; private ArrayList m_store; the rest of the code below is in the Calculator class: Can someone see what might be missing? Here is the code: public partial class Calculator : Form { public Calculator() { InitializeComponent(); m_value = ""; m_store = new ArrayList(); } private void btnSeven_Click(object sender, EventArgs e) { AddToArray(btnSeven); } private void btnEight_Click(object sender, EventArgs e) { AddToArray(btnEight); } private void btnNine_Click(object sender, EventArgs e) { AddToArray(btnNine); } private void btnFour_Click(object sender, EventArgs e) { AddToArray(btnFour); } private void btnFive_Click(object sender, EventArgs e) { AddToArray(btnFive); } private void btnSix_Click(object sender, EventArgs e) { AddToArray(btnSix); } private void btnOne_Click(object sender, EventArgs e) { AddToArray(btnOne); } private void btnTwo_Click(object sender, EventArgs e) { AddToArray(btnTwo); } private void btnThree_Click(object sender, EventArgs e) { AddToArray(btnThree); } private void btnZero_Click(object sender, EventArgs e) { AddToArray(btnZero); } //create method for array to calculate private void AddToArray(Button btn) { //m_value this to set the value m_value += btn.Text; //set label lblResult = " to display it to user lblResult.Text += btn.Text; //make all enabled to use it SetEnableOperatorBtns(true); } private void btnAdd_Click(object sender, EventArgs e) { AddOperatorToArray(btnAdd); } private void btnSubtract_Click(object sender, EventArgs e) { AddOperatorToArray(btnSubtract);

    C# data-structures json help question

  • Convert Time
    O onetreeup

    Thanks, that's what I needed, another pair of eyes. I must have deleted a bracket accidentally. Runs fine now.

    C# help

  • Convert Time
    O onetreeup

    This was working, but right now I am getting the following error: Expected class, delegate,enum, interface, or struct I am new to c#, and in a class where we are not using the timespan yet, and will not touch on that in this semester. I you could look at the code I have supplied, and maybe help me find the error, that would be great. Thanks :-D

    C# help

  • Convert Time
    O onetreeup

    = ConvertTime(timeArray[x]); } for (int x = 0; x < timeArray.Length; x++) { Console.WriteLine(timeArray[x] + " " + decTimeArray[x]); } Console.ReadKey(); } } public static double ConvertTime(string rawTime) { int hours; int minutes; double dminutes; double decimalTime; string delimStr = ":"; char[] delimiter = delimStr.ToCharArray(); string[] split; split = rawTime.Split(delimiter); hours = Convert.ToInt32(split[0]); minutes = Convert.ToInt32(split[1]); if (minutes < 7) dminutes = 0.00; else if (minutes < 22) dminutes = 0.25; else if (minutes < 37) dminutes = 0.50; else if (minutes < 53) dminutes = 0.75; else dminutes = 1.0; return decimalTime = dminutes + hours;

    C# help

  • How to handle null values when reading array
    O onetreeup

    I apologize if my question seemed stupid. I am looking for assistance with the code, which is why I am in the C# message board. :((

    C# question data-structures tutorial

  • How to handle null values when reading array
    O onetreeup

    I have an array that I am converting values from. It is a comma delimited file, and has some null values in it. While I am reading the file to convert, how can I handle the null values?

    C# question data-structures tutorial

  • convert time and minutes
    O onetreeup

    Thanks, that work, my problem was placing a value in the [], but the second method that I am trying to resolve is separating the minutes in order to calculate the time based on the criteria. Time is based on minutes, for more than 7 minutes, no extra time, for more than 22 minutes, change to 0.25 (or 15 minutes). How can I add that to a for statement? if (dminutes >= .07) dminutes = 0.00; if (dminutes <= .22) dminutes = 0.25; if (dminutes <= .37) dminutes = 0.50; if (dminutes <= .53) dminutes = 0.75; if (dminutes > 53) dminutes = 1.0; return ConvertTime;

    C# help

  • convert time and minutes
    O onetreeup

    Yes, I am new to C#, the error is being created from the Main method: string[] timeArray = new string[14]{"8:17", "15:26", "18:32", "0:46", "10:38", "13:56"};

    C# help

  • convert time and minutes
    O onetreeup

    I am working on a method to convert time, 00:00 to a double 00.00, and separate the minutes from the time to calculate elapsed time. I have two methods, but am getting a 'Invalid rank specifier: expected',' or ']' error. Hope this is not too long, please help. class TimeConversion { static void Main(string[] args) { string time = "00:00"; double hours = TimeSpan.Parse(time).TotalHours; double minutes = TimeSpan.Parse(time).TotalMinutes; string[] timeArray = new string[14]{"8:17", "15:26", "18:32", "0:46", "10:38", "13:56"}; //return timeArray; Convert.ToDecimal(timeArray); Console.WriteLine("8:17", "15:26", "18:32", "0:46", "10:38", "13:56"); Console.ReadKey(); } static double ConvertTime(string clockIn, string clockOut) { string time = "00:00"; double hours = TimeSpan.Parse(time).TotalHours; double minutes = TimeSpan.Parse(time).TotalMinutes; double dminutes = Convert.ToDouble(minutes); foreach ( if (dminutes >= .07) dminutes = 0.00; if (dminutes <= .22) dminutes = 0.25; if (dminutes <= .37) dminutes = 0.50; if (dminutes <= .53) dminutes = 0.75; if (dminutes > 53) dminutes = 1.0; return ConvertTime; } } Thanks OneTreeUp

    C# help

  • Sort thru arrays for elements
    O onetreeup

    I have an array with 4 elements in each record of 8 records, the first element is a string, the other 3 are int. How do I pull the 3 elements, i.e., 98, 97, 98 from the record, then add them together? Thanks

    C# question data-structures

  • calculate elapsed time for timecard
    O onetreeup

    I am in a class, and need assistance to convert the HH:MM to decimal when reading from a timecard table. OneTreeUp

    C#
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups