blah blah blah is here! blah blah » Close

0
votes
2 answers

How to reverse a String

Hi I have read a binary file at a certain offset and stored it in a string. What I want to know is how to change it from little endian to big endian... So I have stored D159FBFF but want it to be changed to FFFB59D1 ... How would I go ab ...

0
votes
1 answers

Removing part of a string from a file

I am creating a file with some text codes. In the file if I encounter "G95" in the following format: "G95X-0.4323Y-0.3791I-0.2162J-0.1896" Then how can I just remove "G95" from the above line stored in a ...

1
votes
1 answers

Time string in textbox.

Hi. I have an application that I need the user to enter a time in this format: "1700" (five o'clock in the afternoon). I have two textboxes and first the user inputs the time started and then the time finished. So it is somethi ...

0
votes
4 answers

How to use a string as a name of a variable in c#

Hi mates, How to use a string , to be a variable name, for example suppose X="WELL" then I want to have an array with this name -> double [] WELL = new double[10]; more specifically I want to create a set of arraies, in ...

0
votes
2 answers

Cannot implicitly convert type 'string' to 'System.Drawing.Size'

I've searched around, and I'm not finding a solution to this one so I figured I'd ask you bright people: Trying to pull form size information out of a database and pass it to a form upon instance. The relevant code in the parent form ...

1
votes
1 answers

Saving Form Location to DB?

I am trying to save a form location to a database whenever the LocationChanged event is triggered on that form. [code] private void DisplayForm_LocationChanged(object sender, EventArgs e) { DSLocation = t ...

-2
votes
1 answers

Help with homework

I have to answer the question. What built in function converts a string to an integer (include parentheses but no argument)? in c# I am a beginner at this and am struggling to find out how to do this. Can anyone help please?

1
votes
1 answers

C# string operations

Hi I have an sql statement, i would like to return only the values in the last set of parentheses? For example: I have the following SQL: [code]INSERT INTO TableName(Id, Name, Description, Category) VALUES (1, 'Someone', 'Manage ...

0
votes
1 answers

Non standard characters in strings

I'm developing an application that has to read in the contents of a file and convert its contents into a slightly different form. The file is a simple text file (will open in notepad). Everything's working OK except for one thing - the file ...

1
votes
11 answers

Fetch string value C#

Hey, [li]I have a string value (tmpfile) in my Login Form, How can I fetch it's value into my From2????[/li] [code]string tmpfile=""; public void Button1_click() { tmpfile += Form1.Paths.logpath + comboBox1.Text + ".tmp& ...

1
votes
4 answers

Adding two string values C#

I'm just trying to keep two string values (filename & path) separate and later trying to combine them......[code] string sourcepath = "V:\\Common\\gsvirdi\\"; string bakpath = "E:\\gsvirdi\\backup"; ...

0
votes
0 answers

Public Constructor C#

I'm having a public const string logpath & logfile; in my Form1 I'm trying to access it in my LoginForm, like this: [code]//Create a temp file File.Create(Form1.Paths.logpath + comboBox1.Text + ".tmp") ...

1
votes
4 answers

Compare a string against several values

foamy
2499

Hi all, this has been bothering me for a while now so I decided to ask. Is it possible, in C# (.NET 3.5) to compare one string against several values? The below code doesn't compile, but can this be done? [code] string s = Consol ...

0
votes
1 answers

C# - Converting a string to a double with textboxes

in my program I am using a database containing a product name and product cost that is associated with the product. On my form I have several comboboxes for several categories of products , with a textbox beside each combobox. When I select ...

0
votes
1 answers

A few simple data grid questions - date formatting, headers, and a string question

Hi, I have a few questions, and I'm really, REALLY new to C#, trying to make the change from VBA (in which I'm self taught), so if you need more details or larger bits of code, let me know. Thanks in advance :) The datagrid I'm using i ...

Feedback