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

Software Development Network >> Visual C#

Visual C#

New Question

Time Passed
probem with generics
looking for some math and algorithm solutions....
HTML Designer auto generates javascript events
Can't track down or reproduce ArgumentOutOfRangeException
Windows Service OnStart Event
MDIParent - Tracking Key Presses on Child Frames ?
uniquely identify a printer
anyway to improve IDE performance
C# Naming Convention and Guidelines regarding "this" keyword

Top Answerers

gauls
kirillkin
CPS
rviswa
Chaitanya15
Jehan Badshah
Karg Weng
die fledermaus
Joe H
Manik Gupta
Bowers Freelance Software
Only Title

Answer Questions

  • Testsubject Abstract Generic Base Classes... how to refer to the derived type?

    Hello all, my first time posting here on MSDN, so be easy on me. :) I have an abstract base class that takes a generic type parameter to strongly type a member. So, I have something like: public abstract class BusinessObjectBase<INFO> : IBusinessObject where INFO : EntityBase { public IBusinessObject Update() { ... } } ... public sealed class User : BusinessObjectBase<UserEntity> { ... } My issue is, I'd like to have a method pass back a saved version of the business object back from the Update() method; however, there doesn't seem a way to do this in a strongly-typed way. From the User, object, I can only pass back either a type "object", type "IBusinessObject", or type "BusinessObjectBase< ...Show All

  • Lolka Dumb question

    Can anyone tell me whatwould be needed here to set the value to '0' zero and/or format the double. public double F04 { get { return this .Field04; } set { this .Field04 = value ; } } <newbie > Ok I get it Now I am not sure if you can directly display a double value as 0.00 the problem is Double is not an object it is a primitive type which means it is not a class rather a Struct. there for it will not have null rather 0 as a default value. But there is good news you can work around this here is how your current Propertry is like this double Field04; public double F04 { get { if ( this .Field04==0) t ...Show All

  • Alex Merchant differecse between AppendText and Text+=

    What is the difference between: 1) rishTextBox.AppendText("any text"); 2) rishTextBox.Text+="any text"; the second arise a problem but the first dont make the problem. Use Rtf property instead of Text. bola shokry wrote: What is the difference between: 1) rishTextBox.AppendText("any text"); 2) rishTextBox.Text+="any text"; the second arise a problem but the first dont make the problem. Semantically they are very similar. Using Text += ... causes a new string object to be created and assigned to the Text property. That Text property's set method sends a message to the control the set the text. The AppendText metho ...Show All

  • Myime Sql Server and Mediafiles

    Hi How do you save an Avi file in a Sql Server database My application also allows users to view the videos. How do you do this Is it possible to directly stream the file, without downloading it before (local copy) Are there any tutorials or examples (code) Thank you Thanks for answering. At home I've only got SQL Server Express, and there are no such samples available. Is it possible to get the samples from the net Try here - http://www.microsoft.com/sql/downloads/2005/default.mspx - I can't promise you this sample is downloadable... In sql server 2005 it is possible to upload a file to the database using clr. You have a sample ...Show All

  • Neftali Reyes get folder share permissions

    Hi, I have a path and a userID - how can I find out if the file (path) is shared with the user (userIdentity) In other words, how can I get information about the share permissions of a specific folder Thanks, Ralph Thanks Sergio, let me specify the problem: I need nothing else, than the user and group names (e.g. everyone)  listed in the "share permission" panel of the folder properties of a specific folder. Is there no C# method (similar to the method which returns the file access rules of a folder)     Look NetShareEnum, NetShareGetInfo http://pinvoke.net/default.aspx/netapi32.NetShareGetInfo ...Show All

  • Pablo Orte Capturing the up/down arrow key in a child form

    Hi, Recently, I was trying to capture the UP arrow key from my window forms application. I was able to capture the key in the parent form but once i open a child form, I would not be able to capture all the arrow keys but the rest of the keys like 'a', 'b','+' and etc are ok. I have searched the web but did not find any solution. Does anyone know how to overcome this problem Thank you. Soh Hmmm, Strange... I try to create 2 form, Form1 and Form2. Form1: IsMdiParent = true; private void Form1_Load( object sender, EventArgs e) { Form2 frm = new Form2 (); frm.MdiParent = this ; frm.Show(); } Form2: KeyPreview = true; private void For ...Show All

  • Pockey How to link other *.cs files

    Is it possiable for me to include a .cs file in to another file.. what Im tring to do is.. on one file I have created a namespace, and I want to call this namespace on another .cs file, is it possiable Also I'm new to c# only been coding in it for a week. Thanx :) Sorry I'ts my fault for not mentioning that I'm not using any IDE, I'm just using a regular programmers editor, also is it possiable for someone to show me an example or point me in the right direction please. Thank you for your help. -- Edit -- I'm  also using  the .net framework with the cs compilar to compile  my files. Include another .cs file in your project or referenciate another .cs file from your current .cs file You can add the .cs file ...Show All

  • oldSAP [c to c#] function with ptr to struct as parameter

    hi all, i have to use this function from a c DLL. The function need pointer to struct as parameters. [ DllImport ( "SeqManager.dll" , SetLastError = true )] static extern uint SeqManagerGetSequenceList( out SEQUENCE_INFO ppSleepSequencesList, out SEQUENCE_INFO ppMoodSequencesList, out SEQUENCE_INFO ppNapSequencesList, out SEQUENCE_INFO ppWakeUpSequencesList); the SEQUENCE_INFO structur is like this : [ StructLayout ( LayoutKind .Sequential)] public struct SEQUENCE_INFO { string szPathName; string szFileName; uint dwDuration; string szGuid; IntPtr pNextSequence; }   when i use the following code i get an unknown exception pu ...Show All

  • Bodylojohn splitting a string into an array ... where a ' is involved...

    I have a string like this: "'IRE','ENG','SCO','WAL'" And I want to put it into an array like this: string[] countries = codesList.Split("','"); Well thats the idea anyway but I can't get it to split, nor can I just replace the char ' . Any ideas In the end I opted for arrayList1 .AddRange(countryList.Replace( "'", null ).Split("','".ToCharArray())); separators[] string = new string[] {"','"} string[] countries = codesList.Split(separators, StringSplitOptions.None); to remove first and last single quotas, you can do, like this: codesList = codesList .Substring(1, codesList.Length - 2) separators[] string = n ...Show All

  • kailuowang Problem

    Hello I have problem while using this method : public static void TransferBetweenAccounts( List < Transaction > lstTransactionList) { Console .WriteLine( "Enter the account number you want to withdarw money" ); Console .ReadLine(); Console .WriteLine( "Enter the account number you want to deposite money in" ); Console .ReadLine(); Console .WriteLine( "Enter amount" ); Console .ReadLine(); Console .WriteLine(fromAccount - toAccount); //main fromAccount = new main(); //main toAccount = new main(); //Console.WriteLine(fromAccount - toAccount); } I have a bank console application. Actually I have 3 classes Account,Transactin & main ...Show All

  • TABLO DateTime.parse problem when i change language

    Dear All DateTime.parse giving me problem when i change language, the exception is " the conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value" Thanks for helping. how ever i solved my problem by using following code string startDate = dateTimePicker1.Text; string endDate = dateTimePicker2.Text; DateTime firstDate = DateTime.Parse(startDate);//, culture, System.Globalization.DateTimeStyles.NoCurrentDateDefault); DateTime lastDate = DateTime.Parse(endDate);//, culture, System.Globalization.DateTimeStyles.NoCurrentDateDefault); string date1 = firstDate.Month + "/" + firstDate.Day + "/" + firstD ...Show All

  • WhyHere Backgroundworker (part 2)

    Hi, A few weeks back i was trying to implement backgroundworker. I got a good code sample but i still didn't managed to get it to work. I messed up my whole code. Nothing was working anymore. So i had to work on my backupped project. Now i got it back as how it was again. I was kinda hoping if someone could help me again with it. Some comments would be really appreciated (in plain English). This is my whole class: public partial class FrmWordDisplayer : Form { public FrmWordDisplayer() { InitializeComponent(); this.FormClosing += new FormClosingEventHandler(FrmWordDisplayer_FormClosing); } private void FrmWordDisplayer_FormClosing(object sender, FormClosingEventArgs e) { DialogResult result = MessageBox.Sh ...Show All

  • Rob Harris foreach in C#

    Hi, I use C# in ASP.NET . 1. What is "foreach" and how can I use it 2.How can I have a collection of controls that are in a web page and use it bye Ok, so I modified my test code to perform a number of iterations to overcome any JIT differences: const int NUM_ITERATIONS = 100; Stopwatch stopwatch = new Stopwatch(); int [] array = new int [10000000]; double totalElapsed1 = 0; double totalElapsed2 = 0; for ( int i=0; i<NUM_ITERATIONS; ++i) { stopwatch.Reset(); stopwatch.Start(); Test2(array); totalElapsed2 += stopwatch.Elapsed.TotalMilliseconds; stopwatch.Stop(); stopwatch.Reset(); stopwatch.Start(); Test1(array); stopwatch.Stop(); totalElapsed1 + ...Show All

  • nikki01 Accessing Bits

    How to do this How to access bot bytes, but bites I searched net, found some classes "binary8","binary16" etc, But haven't found this on .Net Base library Check out the class BitArray. That might be what you're looking for. http://msdn2.microsoft.com/en-us/library/system.collections.bitarray.aspx Also, if you're curious how to fiddle with bits in general, I suggest the following tutorial: http://www.c-sharpcorner.com/language/bitwiseropsincsch001.asp That's what you were looking for Ye, kind of, first link gives what i was looking for, second link i have read some days ago, Anyway, thanks. ...Show All

  • MasterModeler Writing Xml from listView

    I am trying to get each item from a listview and write it to an xml file. For instance lets say i have 2 items in the ListView: http://download.com/download1.zip & http://download.com/download2.zip. below is the code i have but it gives me an error: Unable to cast object of type 'System.Windows.Forms.ListViewItem' to type "System.String'. XmlNode nodeDload = xmlDoc.DocumentElement; XmlElement Dload = xmlDoc.CreateElement("Download"); XmlElement dataDload = xmlDoc.CreateElement(i.ToString()); XmlText textDload = xmlDoc.CreateTextNode(""); nodeDload.AppendChild(Dload); foreach (string item in aUrlView.Items) { Dload.AppendChild(dataDload); ...Show All

606162636465666768697071727374757677

©2008 Software Development Network

powered by phorum