Answer Questions
André Scaravelli What is with all of the files for a simple program?
I posted this in the IDE section but got no reply so I am trying it here. I am just learning C# and made a solution for a command line program. I would like to know what the heck all of these output files are for and can I somehow force them not to make subdirectories. I was able to remove the bin directory but not the obj\Debug etc. directory. Also don't understand the Test.vshost.exe file and the duplicated Test.exe and Test.pdb files. \---Test | Test.sln | \---Test | Program.cs - Main Program | Test.csproj - Project | +---bin | \---Debug | Test.exe - Executable | Test.pdb - program database for debugging | Test.vshost.exe - WHAT IS THIS FOR | +---obj | | Test. ...Show All
javert Generic-question
Hi, I want to do something like: Type myType = typeof(myObject); IMyInterface<myType> myInstance = SecondHelperClass<myType>.GetInstance(parameters2); But I keep on getting this compiler error: The type or namespace name 'myType' could not be found (are you missing a using directive or an assembly reference ). Any suggestions on how to do this Thanx, Bart myType is a variable and therefore can not be used as a type parameter to a generic interface. What are you trying to accomplish so that we can better answer your question Michael Taylor - 8/16/06 ...Show All
Daniel Karanov propagation of user-type objects through a webservice
Hello, here is my problem: I have written a webservice with several methods that shall be called by a client application and return data in the shape of a user-defined type. This type contains two string arrays and some numerical information and is defined in a dll. The problem shows up when i want to compile the client; i get the error message: Argument '1': cannot convert from 'Conformity_FTP_Client.localhost.ActualDirInfo' to 'Conformity_FTP_Tools.ActualDirInfo' Here is the critical part of the client sourcecode: Rather than a user-defined type, create an XSD of the request data. Using the XSD.exe tool you can create a designer class from the XSD you create. You can place this class in a DLL that can be used by b ...Show All
jomunoz How do I execute a vbscript from a c# windows application?
I've created a simple windows form-based application that has a single "start" button. When this button is pressed, it fires off the following code: strFileName = "cscript.exe"; strArgs = "c:\\scripts\\Admin\\Info.vbs >> c:\temp.txt"; strWorking = "c:\\windows\\system32"; System.Diagnostics.Process objShellProcess = new System.Diagnostics.Process(); objShellProcess.EnableRaisingEvents = false; objShellProcess.StartInfo.FileName = strFileName; objShellProcess.StartInfo.Arguments = strArgs; objShellProcess.StartInfo.WorkingDirectory = strWorking; objShellProcess.StartInfo.CreateNoWindow = true; objShellProcess.StartInfo.UseShellExecute = true; objShellProcess.StartInfo.WindowStyle = System.Dia ...Show All
TrD Little Help
I have figured out how to open webpages, but, if on the button click you open a webpage, say www.google.com. But, if you have a textbot on the program, and on the button click you want www.google.com/i-typed-this-in-the-textbot, how would you go about coding that Thanks when you press the button, what happens the IE Window launches with the url correct, to navigate to that page what is the url to that page copy and paste the url/link here. would be ideal if you can also post your entire code here, as is Sure, ok, basically I have a program, it has on it: 1 button, 1 text box. If someone types C# into the text box, then clicks the button "Search", it will search C++ on a website, lets call the s ...Show All
Jnox compile code and add it to the context
Hello, I'm using the c# compiler interface in order to compile code on runtime. in the compiled code I'm adding classes, and I want thses classes to be available in the next compilation. Is there a way to add a reference the in-memory assembly thanks, You are a little bit unclear. What i figured out is that you need posibility to see all new things you're writing and changing immediately. Probably you reference that library as a file reference instead of a Project Reference. As far as I know, you cannot add a reference unless you have a path, which means you are stuck to have the file on disk. I am not sure why there is this limitation, as it would stand to reason that all the metadata are equally available ...Show All
KrishnaUNISYS Convert Decimal to String???
this .txtCommission.Text = ( decimal )_SalesPersonToEdit["Default Commission"]; How do i convert this string to a Decimal, I have tried using ToString() but that does not work and I also tried to use Convert.ToDecimal(string) = object....and that didnt work eithier any help on this situation! thanks! private void LoadSalesRowObjectToForm(System.Data.DataRow SalesPersonToEdit) { try { _SalesPersonToEdit = SalesPersonToEdit; int i; for (i=2; i<_SalesPersonToEdit.Table.Columns.Count; i++) { if ( i < _SalesPersonToEdit.Table.Columns.Count-1) { if (_SalesPersonToEdit.IsNull(i)) _SalesPersonToEdit = ""; } else { if (_SalesPersonToEdit.IsNull(i)) _SalesPersonToEdit = fals ...Show All
Pascal Mignot Writing to file after using OpenFileDialog.
I've been trying to figure this out ever since .NET 1.1 but have always had the same problem. I've got a button that calls ShowDialog on an OpenFileDialog. When I do this, select a file and click open I'm no longer able to write anything to a file. A basic example of what I'm trying to do is click the button, have the user select a file. Get the path to that file from the OpenFileDialog, and save that file to a test document. I want to write it to a config file like this: FileStream file = new FileStream("Config.xml", System.IO.FileMode.Create, System.IO.FileAccess.Write); StreamWriter sw = new StreamWriter(file); sw.Write(openFileDialog.FileName); sw.Close(); This works if I never make a call to ShowDia ...Show All
MechEng85 abstract class vs interface in term of speed
Hi guys, I read every whare abstract class are faster then interface because interface require extra in direction. i want to know about how compiler deals with interface and abstract class. Thanks What kind of test would you write that would answer your question I recomend to read this article http://msdn.microsoft.com/library/default.asp url=/library/en-us/dndotnet/html/fastmanagedcode.asp BTW, interface methods are internally just abstract methods, there is no reasonable difference you should care about iExample.Test() and cExample.Test() both "Test" method having same code. Thanks Mahesh http://geekswithblogs.net/mahesh ...Show All
DrJim Help refactoring a method
I want to get rid of repetative code in the attached method I created (like in my If statements as you can obviously see, most is repeated but just for different product types) but not sure the best way to restrucure it: http: / / www. webfound. net/ forum_ posts/ repetative. txt Well, as far as I can see, everything in each of the if (ProductType == ".....") block is identical, (except for the variable name, which is irrelevant), so keep the first one, delete the other two, and remove the if() at the start of it. Note, that your current code has two bugs in it already. You need to assign a prAudioID value for Samples in the switch at the top, and put curly braces around the verbose logging block. Actually, I sp ...Show All
Dylan Barber library not registered error
Hello, I hope someone will have an answer to this question... Using VS. Net + C# I have a a console project called implementer that communicates with another addin project. Both are supposed to send and receive a "struct" that holds a hashtable to store/change info. I got the addin to show up right and it starts listening to the events been triggered by excel. In one of the events, the addin class, via invocation, is supposed to instantiate an instance of the struct and pass it to the running instance of the implementer class which changes and modifies the info in the hashtable of that struct. when trying to send that struct (which is a dll file by itself but added to both projects as reference) I get the error message s ...Show All
motioneye are there module files in Csharp projetcs like we have in VB projects
Thank you The closest equivalent is a static class (a class with only static members). You'll have to qualify the member calls with the class name (which you don't have to do with a VB module), but that's the only real practical difference. e.g., internal static class PseudoModule { public static void SomeMethod() { } etc. } David Anton www.tangiblesoftwaresolutions.com Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: C# to C++ converter, VB to C++ converter Clear VB: Cleans up VB.NET code C# Code Metrics: Quick metrics for C# Hi, No, there are not. What do you need to put on a modulo file Maybe if you tell me I can explain it how to do it in C#. Regards what i need is p ...Show All
Mystagogue serialization demystifyied :)
Hello, can you advise me information about serialization in .NET Framework 2.0 on the web I imagine something more compact than actual MSDN docs are, focused on this topic. In MSDN I didn't found some info, for example: - why ISerializable implementation is not invoked using XmlSerializer and how to customize serialization of specific properties then - why ISerializable methods and any xml attributes do not seem to be required at all, although they're told to be required. - why, when serializing a hierarchy of objects, the contained types (extra types) do not output full type name and just the ending identifier, and how to solve that..(!!) I appreciate tips where to learn about, also if you can advise to this concrete pro ...Show All
mivecxtr Where is the Visual C# Express free download site?!
Try as I might, I cannot find a download site from the Visual C# Express pages. I'm stuck in an endless loop of screens extolling the virtues of Visual C# Express. That's all very well and good, but now I'd like to download it. Where do I go Please give me a URL, thanks.--j.c. hi, here it is http://msdn.microsoft.com/vstudio/express/visualcsharp/download/ enjoy with express.. soemoe ...Show All
cpaesano How do i call a method from a different form?
Hi, I have 2 forms that are closely linked with each other: form1. a form which lists a bunch of different layers form2. a form which describes the layer (i.e. name, colour, etc) if i change something in form1, i want to call an update function in to update the display in form2, and vice versa. What is the best way to do this from my knowledge, using delegate only works in one direction, correct me if i'm wrong. My idea is to create the update functions within their respective classes and find some way to call that function from the other form. is that possible i have already set it up so that they are sharing a data structure, i just need them to access each other's functions. thanks. ...Show All
