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

Software Development Network >> Visual C#

Visual C#

New Question

Same KEY & IV for TripleDES Encryption as well as Decryption in 2 different Win Services.
Component class, list of values to an attribute.
Conversion Issue from VS.NET 2002 to VS.NET 2005
Object Oriented Programming
C# and Big-Oh notation
COM Interop and Finalize
smtp client/server for password recovery, logins etc
Show Startup Programs
Hidden files/folders? C# 2.0
how to work with my monitor

Top Answerers

TokyoDev
Tom_Liu
kwards3
MadVax
Rafael Mores
Ulrik
Seas Comander
John CHLee
Ryn
mamrg
RTF-2-HTML
Only Title

Answer Questions

  • emcee help with date formatting...

    Hi, Currently the below text box prints the date 12/13/2006. But it should be MM/DD/YYYY. Could some one please show me how to change the formatting. Thanks. TextBox txtArrival = (TextBox) (e.Item.FindControl("txtArrivalDateAdd")); if(txtArrival != null) arrival = Convert.ToDateTime(txtArrival.Text); Hi, The static methods you need to use are: DateTime.Parse or DateTime.ParseExact. Here is the documentation on converting strings to dateTime values with links to examples can be found here: http://msdn2.microsoft.com/en-us/library/2h3syy57.aspx (or type DateTime.Parse, highlight it and hit F1.) Troy Maagennis. Look into using a calendar control (S ...Show All

  • RogerT Remove picture Box Controls

    Hi all I have windows form, where in picture boxes are dynamically being created, I need to Remove all picture boxes from the form every time user clicks on the button to load new images , how can i acheive this. i tried with the following code , but it didn't worked PictureBox pic; foreach ( Control ctr in frmScreenShot.ActiveForm.Controls) { if (typeof(PictureBox)== ctr.GetType()) { ctr.Dispse(); } i also tried with this code snippet PictureBox pc; if (this.Controls.Contains(System.Windows.Forms.PictureBox )) { this.Controls.Remove(pc) ; } Welcome Each suggestion Thanks You could add another parameter to the method that gives th ...Show All

  • Thrix How to check for letter

    in my if statement i want to check to see if the user has entered a letter, how would i go about doing that since i cannot convert string to char.....and it seems C# doesnt let you do IsNumeric(string value) like in VB....any help with this   [code languge="C#"] double y = 0; if (x.Length <= 8 || x.Length > 13) { MessageBox.Show("Your phone number does not contain the correct " + "number of digits. Please format number " + "as ###-###-####","Incorrect Number Format", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return x; } [/code] If I were you I'd use regular expression to validate the phonenumber. IMHO it looks cleaner than iterating through the string. Have no idea whic ...Show All

  • Sajid Hussain IDbConnection and get data in a dataset

    Hello Everyone, I'm using IDbConnection to connect to database and that works perfectly fine.... I can do something like this as well...and this is good too.... IDbCommand command = conn.CreateCommand(); command.CommandText = "Select id, description from lot"; IDataReader dr = command.ExecuteReader(); while (dr.Read()) { string some = dr[1].ToString(); } The problem I'm facing is how to return it in dataset, as I directly want to bind my controls....or somebody can suggest a better way to do it... Thanks, Harsimrat Awesome, Thanks a lot...It works really well..... There is one more thing.... /// <summary> /// The ConnectionManag ...Show All

  • bennymacca TimercallBack?

    assume i have 100 timercallback running and they all accessing the same function in different timespans and each one will update the same table in the database. 1) should i lock the code in this function to make sure the database update will not be damage due to the parallel access to the function 2)how can i assign an argument to a timercallback,i mean when the timercallback[34] is started i want a certain value to be known to the function" like passing an argument with a function" timercallback[55];<----it's turn to go to the function .. function() { argument=current timercallback value; .. .. } I'm assuming you mean with a timer on a form You're not exactly clear on how you're creating timers, or ...Show All

  • bbaldwinwa Refactor - Encapsulate field

    When I use refactor - encapsulate field I get the preparing files dialog and then it scans all the files in the project. It never used to do this and it now takes so long that there is no point in using encapsulate field as it is quicker to type it. On colleagues pc it works immediately without the scan, we are on the same spec pc. Have I changed a config setting somewhere Any help would be appreciated. TIA Thanks for the reply. Yes, I'm using ASP.Net. I'm currently using the file system (internal VS web server) web projects, if that makes any difference. cheers Are you both using ASP.NET I have a hazy recollection that there's an issue with this refactoring in this context and that there was a workaround. ...Show All

  • Billr17 dateTimePicker = DateTime.Now & "Time"

    Whats the most efficient way to : Fire an event on a certain Day, Date and Time... Im using a dateTimePicker...for the day, date. Time is in comboboxes, start and end. ("1 AM") Just started...formatting is getting crazy...there must be an easier way. Set the Format property to Long and use Value to read DateTime type of selected date. Also posible is to use MaskedTextBox control. date time picker is to determine which day and which time just a UI for the user, but what fire the event is the code that you will write the best thing for that i guess is using timer hope this helps One thing you'll probably want to keep in mind when using a timer to check if the date/time equals the select ...Show All

  • ASI Tech How to have multiple sets of application settings?

    Hi, I'm using the standard mechanism to set and retrieve application settings (using app.config, Settings.settings and Settings.Designer.cs). I can set the application settings using the Visual Studio IDE and retrieve them like this: string title = Properties. Settings .Default.WindowTitle; This works fine - for a single set of settings. But now I'd like to run multiple instances of my application, pass them an argument that makes them unique (1, 2, 3, or "master", "slave"), and use that argument to access a specific set of settings. Preferable something like: string title = Properties. Settings .Master.WindowTitle; or string title = Properties. Settings["Master"] .WindowTitle; Is thi ...Show All

  • Andrej Tozon Config file properites

    Hey All! I need to create in app.config sth like this: <Accounts> <Account UserName="John" /> <Account UserName="Fred" /> </Accounts> So it will be a custom section. I tried to get help on it in MSDN Library but after creating custom section I got: <MyCustomSection> <Accounts> <add UserName="John" /> <add UserName="Fred" /> </Accounts> </MyCustomSection> It's pretty good :) But I don't want this <add UserName.. . instead I'd like to have nice <Account> tag what I should change My code is based on ConfigElement example from MSDN instead of URLS I put accounts and I simplified it a lot so I ...Show All

  • Darrin Turner Parametersized property!?

    I am *very* surprised at the fact that C# does not support parameterized property! The only thing I get is the so-called Indexer, but that does not provide the same functionality as parameterized property. For example, I can write the following code in VB: Public Class test Property Name(ByVal key As String) As String Get Return key End Get Set(ByVal value As String) End Set End Property Property Address(ByVal key As String) As String Get Return key End Get Set(ByVal value As String) End Set End Property End Class The two properties both have a String parameter and both return a String object. However, in C# I can only write only *ONE* indexer: public ...Show All

  • Itzik Paz Getting started with Business objects

    Hi guys, i m trying to get started with Business Objects, but i m a little bit lost here.. hope you guys can help me out. So far all the tutorials i read on the internet just show you how to make an "employee" or a "product" class, coding that is very simple, and i don’t have any problems using them and even binding them to Windows Forms using BindingLins<T>, etc... i ve been testing it out and it works fine. But right now i m trying to make something that have some relations, and i cant figure out how i am supposed to do it, what i m trying to do is a simple "Order" class that is related with a customer and some products... something like: Order Customer Products So, could you guys help me out with this ...Show All

  • Yngwie problem with String.Format function.

    hi friends, i got a problem when i do the following operation. String.Format("{CN={1}}","hello"); this is giving error while execution.String not in proper format. but the following thing works, fine String.Format("{0}CN={1}(2}","{","hello","}"); Is, their any better way to do the above operation.Like, is their any escape sequence for {. Any suggestions, Ranu. Thanks for your  reply. its working fine with my application. can you explain more on this. Thanks and Ragrds Ranadheer String.Format("{CN={1}}","hello"); failed because of two things - f ...Show All

  • simsod One project to rule them all

    I have a solution with 2 projects (each project builds a DLL). I want to create a 3rd project that takes all the settings and code from the first 2 projects and create one mongo DLL. What's the simplest way to achieve this Thanks! -- Smeagol Shared project What is that What I don't understand/know is how I can have a single solution, which houses 3 projects Foo.dll, Goo.dll, and Mongo.dll (made from Foo & Goo projects). I don't want to have a separate project that I must maintain the settings for. For example, if I add a new pre-processor definition to the Foo project, I would like Mongo to auto-magically receive that setting change. Does that make sense Is this possible ...Show All

  • erbere Unable to debug C# solutions

    I'm using Visual Studio 2005 Pro. This problem is repeatable with archived code on backup discs as well as new solutions. When I attempt to run my apps in Debug Configuration with breakpoints, I get the message: the following module was built either with optimizations enabled or without debug information. D:\Programming\Solutions\******... To debug this module, change its project build configuration to Debug Mode. To suppress this message, disable the 'Warn if no user code on launch' debugger option. Here's a screenshot . This is done with a brand new solution. File > New > Project > C# > Windows/Windows Application > Ok > Build > Run. [update] as par this thread , I've tried restoring factor default settings.  ...Show All

  • lym51 Converting '00' hex character into '20' hex.

    Hi, I am having difficulty handling a byte array that contains the hex equivalent of '00'. .Net seem to treat this as an escape character when I use the byte array converted to a string. I would like to replace the special character with a space ('20') but I cannot seem how to do this. Mainly because '00' does not have a string equivalent. Any ideas Thanks. If it is in a byte array then you can enumerate the array and replace all '00' values with '20' values. for (int nIdx = 0; nIdx < arr.Length; ++nIdx) { if (arr[nIdx] == 0) arr[nIdx] = 0x20; } You could get fancy and use the Array.ForEach method as well. static class ArrayEx { public static void Replace<T> ( T ...Show All

1234567891011121314151617

©2008 Software Development Network

powered by phorum