-
- string to a number... plus can you simply read a number from standard i/o
by MrZkitten
- 2 Replies
- Last post
by MrZkitten
- now i remember why i abandoned 'c' for basic and pascal, data handling.
what i want to do is fairly simple, but when appled to standard data is fairly usual in a business program.
i want to input a 'number' from the console and manipulate it.. thus...
in basic:
input "please enter a number:";a
input "please enter a number:";b
print "the sum
-
- Type convertion
by Ng_zi
- 3 Replies
- Last post
by Mattias Sjogren
- Hi, does anyone know what is the type called "System.String[ * ]"
when I try to cast it to System.String[], I get error.
((string[])(value))[3]
but the same statement works in the Watch window i.e the value can be shown.
so how can I cast it to string[]
thank you.
-
- Datagrid and sql datetime in multiple langauge
by Wildmind
- 0 Replies
- Last post
by Wildmind
- I have a datagrid which is being populated from a sql source. The problem I have is the sql server has a regional language settings of English (United Kingdom) but some of the clients are setup as English (United States). All fields within the datagrid know they are a DateTime format and when UK region is selected, everything is fine. Unfortunatly when the client is under a US region, an exception
-
- Split function definition accross Partial Classes
by fbalas
- 12 Replies
- Last post
by fbalas
- Is it possible to have a method defined in foo.designer.cs and then add something to it, and control whether the addition gets executed before or after the designer code, by adding a method in foo.cs So something like: partial public class foo.designer.cs{ private void doSomething(){} } partial public class foo.cs{ partial override private void doSomething(){
-
- Best Practices: APM vs BeginInvoke?
by Greg D
- 0 Replies
- Last post
by Greg D
- I'm working on a component that will be queueing potentially time-consuming jobs against a different, possibly remote, process. For obvious reasons, I want to perform these jobs asynchronously. I'm currently defining the interfaces that I'd like this component to expose, and while I've got the basic operations down for this iteration, I'm a little unsure about the sort of interface that I should e
-
- Vertically Splitting A Code Window, Is It Possible?
by DavidLudwig
- 2 Replies
- Last post
by DavidLudwig
- When editing a C# file, I am able to vertically split the view, either via the IDE's menu bar (Window -> Split) or by clicking and dragging the splitter bar that sits just above the code view's vertical scrollbar. Does anyone know if it's possible to create a vertical splitter bar, such that I can have two views of one file, side-by-side, as opposed to one on top of the other
-
- TargetParameterCount Exception / Parameter count mismatch Issue
by rutlean
- 4 Replies
- Last post
by rutlean
- I am getting a TargetParameterCountException occured "Parameter count mismatch" anytime an event is thrown. Given how early the event are being thrown, timers are throwing the events that cause the exception. The following is the message I get when the exception is thrown. All of this occurs after a splash screen is closed upon the mainform being loaded. As soon as the timer event is thr
-
- when can I use StringBuilder over String Type?
by My Vizai
- 5 Replies
- Last post
by Figo Fei - MSFT
- Hi Experts,
I'm confusing when to use string builder over String Type.
I Think If i'm doing more concatenation operations , it is preferable to use StringBuilder.
Can anybody tell me , the performance issues regarding usage of stringbuilder.
Thanks In advance.
-
- Is there an easy way to learn internationalization in c#/.NET
by Tango-Charlie
- 2 Replies
- Last post
by OmegaMan
- Hi Guys, I have been struggling to learn internationalization in .NET.....I could not find any documentation/tutorial which gets u started with basics of it and then it becomes easier to build applications. There might be lot of documentation of it but it seems to be scattered and it does not give u any chapter wise explaination of it. For example, to learn internationlization in Java, all u hav
-
- Class Implementation
by Azurewrath
- 7 Replies
- Last post
by Azurewrath
- Hi all,
Recently when I was implementing my vector3 class, I thought of implementing it using multiple files each having a partial class definition of the same class. Like separate files for operators, instance methods, private methods, static methods, etc. Is this reasonable or is it something that should be avoided
If not then, what is the use of partial keyword for classes
-
- How i retrive number of my program that is now running ?
by omid talebi
- 7 Replies
- Last post
by H. Tony
- i want that user can only run one instance of my program. what i do
-
- Using C++ dlls in C#
by tl.tang
- 3 Replies
- Last post
by tl.tang
- Hi All, A client of mine is moving on to a C# application which basically calls selected dlls to run to get some output. The problem is that his current dlls are in C++ (created using Visual C++) and he is reluctant to switch to C#. Does anyone know if these C++ dlls can work properly in C# Does P/Invoke help to take care of any possible conflicts arising from this Many thanks, TL
-
- Question on where to uninstall Code Snippet?
by Focus
- 6 Replies
- Last post
by Focus
- Hello,
I have a question on Code Snippets.
I installed a snippet by this way:
1.Put a folder in C:\TestSnippet with snippet files
2.In the registry I add a new key under HKLM\Software\Microsoft\VisualStudio\8.0\Languages\CodeExpansions\CSharp\Paths call mySnippet with value ¡®C:\TestSnippet¡¯
Then in the Code Snippet Manger there will be a snippet item called TestSnip
-
- Help Extracting multiple Substrings
by allison_h
- 2 Replies
- Last post
by James Curran
- Hi,
Can anyone Show me the best way of extracting multiple substrings from a long string
i have a string...
strString = "S1: a,b,c S2: d,e,f S3:ect..."
i need to get S1 and S2 into seperate substrings...
strS1 = "S1: a,b,c "
strS2 = "S2: d,e,f"
I then need to remove the S1: and S2: prefix (prob a string.replace)
strS1 = "a,b,c "
st
-
- Command Line Argument
by Hemant Verma
- 2 Replies
- Last post
by timvw
- In C++ While Using Command-Line Argument we put int main(int argc,char** argv) in this *argv[0] Correspond to Relative Path of Application Called In C# public static void Main(string[] args) But their is no Name of Application Called,Can Any One Help me in this.
-
- Classes with the same name in the same namespace....
by andypai
- 12 Replies
- Last post
by Jalf
- Hi All,
In my solution I have 2 classes with the same name in the same namespace. This was legal in VS.net 2003 (.Net 1.1) and all the compiler did was to raise warning about this problem. However with VS.net 2005 (.Net 2.0), this has changed it now throws a compiler error for the same. Is it possible to get around this issue in any way without having to change the class names...
Thanks in A
-
- compile a cs program
by ishkmi
- 2 Replies
- Last post
by decyclone
- hi i try this program But doesnot generate the output..
Process p = new Process(); p.StartInfo.FileName = @"C:\WINNT\Microsoft.NET\Framework\v2.0.50727\csc.exe"; p.StartInfo.Arguments = @"/out:c:\IMAprogram.exe a.cs"; p.Start();
can any one tell me what is the wrong in this program
-
- Equals Method
by Azurewrath
- 14 Replies
- Last post
by Azurewrath
- Hi all,
I am confused about overriding this method. So my question is, when I implement the == operator for a class, do I have to implement the Equals method for both instance and static methods
I know it can¡¯t be declared static, but what I mean is this:
Vector3.Equals(object objA, object objB)
objA.Equals(object objB)
Do I have to implement both Because m
-
- How to keep base class methods private in a derived class
by mihooper1
- 5 Replies
- Last post
by mihooper1
- I am writing an API (C# class library) to distribute to users of my product. I derive this class (derived.cs) from a base class (base.cs) so that it is a wapper for the base class so that the base class is hidden. I have declared the methods in the base class as protected so that my derived class can have access to them. However, when using the the resulting .dll as a reference in another applicat
-
- How to handle private variables?
by mshvw
- 2 Replies
- Last post
by Steve Py
- Hi, A fundamental problem is spinning through my mind for years. MyClass contains different private methods that all handle (read/write) specific private variables. My problem is this: how do I know what private method updates what private variable without having to look inside the method's code (and without having to comment that method what variables it modifies) I think it's no nice solution to
-
- Appdomain on a remote machine
by Salu
- 6 Replies
- Last post
by Salu
- This is what i need to know... Just imagine i have a .net Console app(dinky app ) and assume it consumes 1mb memory Now i have a second instance of the same app it will also consume 1 mb memory .. so if u have 10 instance of this app(processes) u will end up with 10 mb and to be frank this app is just 10KB size... when u look using process explorer it shows that the other part of the extra memory
-
- What can a subclass do?
by IS dude
- 7 Replies
- Last post
by Dennis Stone - MSFT
- I am a little confused about what a sub class can do with the variables and methods inherited from the super class. According to the book I have read, the subclass can choose to do one of the following: 1. Accept the same variables and methods by doing nothing 2. Ignore the same variable and methods by doing nothing also 3. Add new variables and methods 4. Override the variables and methods. My qu
-
- c# method, event wizard
by ityu
- 5 Replies
- Last post
by Anson Horton MSFT
- Hi, am starting to work my way through a tutorial book, trying to learn C#. It tells me to run the C# Method Wizard, by right-clicking an existing Class in Class View and selecting Add > Add Method. There is no Add option in Visual Studio 2005 (which I am using). I have looked around for about an hour trying to locate the Method Wizard, but the help does not tell me anything more than it is t
-
- Pinned Shared Memory??
by carlao
- 2 Replies
- Last post
by OmegaMan
- In Unix environment an app can create a pinned shared memory. When this app end the shared memory continue available to the same or others apps that will be started after that (I am not considering security issues here).
Is there a way to create a pinned shared memory in C# that has the same behavior I mean, my C# app ends but the next time it start the shared memory is still there to be used.
-
- Toolbox Icons screwed up
by MacKenzieMi
- 12 Replies
- Last post
by Kvasi
- Hey everyone
Recently when I opened Visual Studio 2005 I noticed that all of my icons in the tool box are screwed up. Now this isn't the end of the world, but I have noticed that alot of times I am fuzzy on the name of the control over what that dumb little icon looked like. Has anyone see this before Any ideas on how to fix it
Thanks
Kenzie