Software Development Network Logo
  • Visual Studio
  • Audio and Video
  • Microsoft ISV
  • Smart Devicet
  • Visual Basic
  • SharePoint Products
  • SQL Server
  • Windows Forms
  • .NET Development
  • Windows Vista
  • Visual FoxPro
  • Visual C++
  • IE Development
  • Visual C#
  • Game Technologies

Software Development Network >> Visual C#

Visual C#

New Question

Program Crashes.
Partial Specialization of Generics
Easy way to copy a DataTable
how "on the fly" concept work in c#
Reading the end of an XML file
wrap asynchronous calls in synchronous calls
How easy is this in C#?
Using C# dll's as plugins at runtime
Exporting database on to the client machine
Listing files and folders, TreeView usage problem.

Top Answerers

smk_k
nardev
mattdawg
alien35e
GPinNY
Simmy7
learneroob
F. Gsell
Drozdi
SweptSquash
VxDWriter
Only Title

Answer Questions

  • Petr Kadlec Static Methods And Thread Safety

    could somebody please tell me, in the following static method, is it possible for a second thread to call the same method with a different input variable modway through, thereby screwing up the result thanks public static int GetString(int i) { // do some stuff with i. e.g. i = i + 100; i = i / 2 ... etc. return i; } You are missing the point a little bit, in that race conditions are not limited to static methods, issues with threading happen because you are acting on a shared resource at the same time, static methods just expose this more easily. For example, in the code below there are no static methods, yet we still have a race condition, basically the bank account objec ...Show All

  • WXS123 New Window event help needed and some other stuff

    Can someone please help this code below is mean to opena new window but i don't want it to open my defualt browser i just want it to opne a new window in my browser also i would like my browser to goto the users homepage automatically at startup of the program, and a progress bar that works along with when i click a link it updates in the url box. My Current code using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace H2F_Browser_Beta { public partial class H2FBrowser : Form { // Updates the title bar with the current document title. private void ...Show All

  • ToutEnmasm SMTP Response

    I have a web application that sends email using the System.Net.Mail.SmtpClient. Is there a way to wait for a response back from the SMTP server (250/550) Well I don't think the smtp server retries it several times. FOr instance, if you select "Request a deliver receipt" on outlook, using the addresses I specified in my app, it will bounce back right away. I am going to try Ethereal also.. But essentially I need a read receipt somehow for compliancy reasons. That wont work.. I can send it to an invalid email address, but valid smtp server, and according to the SmtpClient it was successful. However, the SMTP server will return a 550 saying that the user is unkown.. That is the information I need to capture. I’d h ...Show All

  • shanlini Install Dotnet Framework With C# application

    Dear All, I want to make an installer for my application using Visual Studio 2005, which will first chick for dotNet FrameWork, if Dotnet Framework 2 already installed then simply install my application, if it is not installed then 1st install dotnet framwork 2 using my own installer and then automatically start installation of myApp, Please show me complete process. Thanks No you have to do this for the CF yourself I believe, or include a redistributional package in the project. There are alot of topics about this for the .NET CF, do a forum search and you will get alot of hits probably. Is this also for Compact Framework In can't get the cabfile installed on windows mobile 5.0 Grtz Annihil8 ...Show All

  • vidya_084 Process Module

    Hi, I have an application which lists all the running processes of the machine and i need to get the full path from which the process is running. I am trying to use the following methods : Process.MainModule.Filename Process.MainModule.ModuleName The above code doesn't work it throws an exception "Unable to enumerate the process modules" any thoughts Regards Alan Hi Kaiser28, I guess this is a security issue. Make sure that you: - run the app with full trust - test the app as local admin // you might need debugging privileges to access other processes - run as admin if running in Vista with UAC enabled There might still be sit ...Show All

  • Leahx Windows Service Started and then stopped

    I have a windows service and it was working fine, and today I tried to stop it and unlike the usual stop process, this one took a longer time. The next time I want to start the windows service, it raise an error that the service started and then stopped, it also said that service with no job stops automatically. When I checked the event log, there is no event about my service. My service worked well yesterday, in fact, it worked as usual just before I tried to stop it . but then I don't know why the error appeared, I don't think I did any changes to the database.. Any solutions or if someone can share his/her own problem similar to this What my windows service do: read a log file, write to log file, then access database, ...Show All

  • patio87 Converting strings to Chars and parsing file paths

    I'm stuck. I've been trying to parse a file path in a variable using .Split but I can't figure out how to use "\" as a delimiter char. I can't convert it to a char, and if I try to directly create it as a char I get the error "Too many characters in character literal". Does anyone know how to do this, or even better, does anyone have an easier method that I'm missing '\' is an escape sequence in many languages from C, C++, Java and C# too so 1st occurance of it is always ignored by compiler: \n means a new line charancter, \t a tab character etc. Note: \n seems 2 characters 1 is \ and other is n but its not the case \ is always ignored in this case. So what you need to do ...Show All

  • JennyMQuinn for loop that works with seconds

    hi how can i make a for loop that increments by 2 seconds i have two for loop nested one inside another and each one will increments by 2 seconds for( start and iincrements by 2 seconds) { if(..){} else { for(start and increment by 2 seconds) {....} } } thanx i want to wait exactly for 10 seconds and between each 2 seconds i have to test for somethings and make conditions for( ; t1<12seconds;t1+=2 seconds) { if(...){....} else { for( ; t2<12seconds;t2+=2 seconds) {..... con=true; break; }} if(con)break; else continue; } Check out the Timer class instead it's much more appropriate for this type of thing. Also, a loop will not be exactly n seconds, it will ...Show All

  • Instinct Converting System.Type to OleDbType

    I can`t find class and methods that convert System.Type to any of dbtypes(OleDbType or SQLType). I know for the mapping tables, but I need conversion methods for all data providers(OleDb, SqlClient, ODBC) . It is not difficult to write that by your own, but I can`t belive that it is not alredy written by Microsoft. Exactly! That`s it, that is one solution. Just, I wanted to make software component that could be used in any situation, independent of the database (I just create dataset through the wizard, and then use one generic tableadapter that works with all datatables in dataset. Adapter creates statements dynamically based on datatable). That means avoiding stored procedures and implementing update ...Show All

  • ZopoStyle BeginInvoke and resource leaks

    From Jeffrey Richter's "CLR via C#": "You must call Endxxx or you will leak resources. CLR allocates some internal resources when you initiate asynchronous operation. If Endxxx is never called, these resources will be reclaimed only when the process terminates." This is written about functions like BeginRead and EndRead. Is this correct also for delegates For example: public delegate void SomeDelegate; ... SomeDelegate someDelegate; ... someDelegate += subscription; ... someDelegate->BeginInvoke(); If I never call someDelegate->EndInvoke, does this create resource leak, as written in the book According to Richter, the only Beginxxx function which doesn't require Endxxx is Control.BeginInvoke. I can use Control.BeginInvoke ...Show All

  • KjeZ Customize Add reference actions

    Hi, is there a way to customize the Add reference action in VS2005 C# By default, when I am trying to add a assembly reference to my project using the Browse tabcard,the IDE writes something like <Reference Include="myAssembly, Version=7.10.2.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\Bin\myAssembly.dll</HintPath> </Reference> I would like to obtain that by default: <Reference Include="myAssembly"> <SpecificVersion>False</SpecificVersion> <Private>False</Private> </Reference> How should I proceed thansk in advance for any answer. best regards Sebastien Yes sure ...Show All

  • cplusplus1 cannot find table 0

    Hi, I have had a problem two days and still no solution. I have a web method within a web service that returns a DataSet. When I test it by hitting F5 everything goes well and my DataSet contains the dat. but if I browes to the Web Service the dataset is empty it does not return anything. and if i call it from another application it gereates following: Cannot find Table 0 .... here is my Web Method: [ WebMethod ] public DataSet GetMyContactsForSmartTag() { Guid MySiteGuid = new Guid("8FADE524-C5AF-4AC5-A5B4-181A4E8077D2"); SPSite MySite = new SPSite(MySiteGuid); SPWeb MyWebSite = MySite.OpenWeb(); SPListItemCollection MyContactsItems = MyWebSite.Lists["MyContacts"].Items; DataTable DT = new DataTable("MyDT"); DT ...Show All

  • Manik Gupta Weird behavior & crash in VS2005 opening my C# project

    When I open my Project, it opens many more file-tabs than I had open when I closed the project. Also, the Project Properties tab opens briefly, showing my "Resources" then disappears again. Often, I get the "VIsual Studio Must Exit, Save All Files and Exit" message. Next time, I don't crash, but still get the extra windows (including the Class Diagram window which I rarely use). I carefully close them, leaving the few I need open, and exit. When I re-open the prject, I get all the extra windows again. Any ideas -Allen ...Show All

  • NeW2VB Mixed languages in Visual Studio

    Can I use mixed languages in Visual Studio i.e. some source files in C# (.cs), others in C++ (.cpp) Thank you for such a prompt reply. Yes, the C++ I have in mind is VC++.NET, so it's worth a try. But I need to know how to call the C# project from the C++ project. Do I declare the C# function as "external" in the C++ A thousand thanks. Following your directions to the letter I got a program that works, which is more than I can say for any of my prior attempts. I can now get back to work! I am grateful to both respondents but, alas, I still don't know how to do it! As a simple exercise I tried to build a solution with two proje ...Show All

  • jitter123456 C# and Big-Oh notation

    hello dear developers, I am a student and also still new to the .net framework. I just want to ask for your opinion or for any comment regarding the imporance of Big-Oh in the coding/programming process. This is for the study we are now currently venturing on. Thanks in advance and I really hope to hear from you, especially those who have been in the biz for sometime now. thanks nobugz. hey dasa, since it's fundamental,so it should e taken into attention right "Or did you want to hear 'nah, nobody uses that stuff - drop that class' " ==> is this true though Big-OH notation is used in analyzing the performance of data structures. There is a good article on this subject on msdn. The li ...Show All

434445464748495051525354555657585960

©2008 Software Development Network

powered by phorum