Recent update: 2008-3-21
Does C# provide any function which will create and return unique identifier? Thanks,
I implement a component, but I can't get it's paraent (a control which contain the component).So I want to get the paraent from constructor's parameter.But the IDE can't create corrent code for my new constructor.How can I make the IDE create correct code?I want to let the IDE automatic ...
hi all, the question as the title please help me to solve this anyone can give me a flavour thanks henry
I want to do something where I can take any variable, reference type (no problem) or value, and have a reference to the data, rather than just the data (in the case of value variables). Example: //create three objects for reference object obj1, obj2, obj3; //create two value variables and one ...
The IDE often automatically changes the file subtype from "Form" to "Code" in the .csproj file, which renders the forms unviewable in design view until that change is undone. Is there any way to prevent the IDE from doing this automatically? Thanks, Wilfred
hi all, the question as the title please help me to solve this anyone can give me a flavour thanks henry
If I call the "Dispose" method on an object, would it be equal to null? And If I make the object equal to null instead, would it be same as calling "Dispose" method of the object?For example:SomeObject obj1 = SomeObject();SomeObject obj2 = SomeObject();obj1.Dispose();obj2 = ...
Easy question, I can modify a C# project using notepad to make a file DependentUpon another file, but is there a way to do this in the IDE? Thanks
Hey fellas, I've got the beta2 Team system thing, - nearly had a heart attack watching the MSDN.TV thing regarding the image library.. but my install didn't include it for some reason, and ideas or suggestions why - it's not somet silly like an extra download from somehwere on msdn is it ?
104 byte By
prem at 2008-3-5
Please tell me what is IOperationInvoker in WCF and the situation where we implement this interface
is there some sample, where can to see the diference between both?
How do i add a static member using the class view...this static method should be named Add() that returns an int value and accepts two int parameters first and second?
Does anybody have an idea about accountability pattern from martin fowler. We have problem figuring out the database schema.
I can use as opertator, for the objets that I created?.
Supposed I have a form with KeyPreview=true and a menu item whose shortcut is CTRL+C. Add a Textbox on the form. When I select some text in the Textbox and press CTRL+C, the selected text just can not be copied because system just call the menu item's OnClick event handler.And then how can I ...
Hi buddies, do any body gone through, how C# communicates with Flash Communication Server? any idea.. please help.. thanks, Vinu
758 byte By
johnk at 2008-2-28
hello,currently i have forms that are selected from a menu but multiple instances seem to be allowed. i would like to have only a single instance of each form allowed, but would like the user to be able to recall the form again after closing the form. other threads on this topic have code that ...
I have 2 buttons name btnHonda and btnToyota, but the click event clicks show:private void button1_Click(object sender, EventArgs e) { } private void btnToyota_Click(object sender, EventArgs e) { }button1_Click should be btnHonda_click .....is this a bug with Visual C# 2005? ...
Why when I add a new row to a DataGridView do all the textboxes show (null)? How do I make it so that these are just empty textboxes? Thanks dave
106 byte By
sn at 2008-2-28
I want to compare two word files and if they are different i need to highlight the place where it differs.
Can someone, for the life of me, explain why this code won't compile with CS0305 as the compiler error?Thanks very much, -Trey-using System;using System.Collections.Generic; public class MyContainer<T> : IEnumerable<T>{ public void Add( T item ) { impl.Add( item ); } public void ...
201 byte By
xgbnow at 2008-2-27
Does anyone know what happen to the "Build Web Comments Page" function that used to be under the Tools menu in VS 2003? It does not appear to be an option in VS 2005? Thanks for the help in advance.
I tried unsuccessfully to use the DataReceived event to read data from the serial port. It gives a thread exception and I cannot figure out what the error message is trying to tell me. So I put a button on the form and added: private void button2_Click(object sender, EventArgs e){ while ...
1048 byte By
guest at 2008-2-27
First, the DebugView program can be downloaded from http://technet.microsoft.com/en-us/sysinternals/bb896647.aspxThis is the tool of choice for viewing output from System.Diagnostics.Debug.Write("message"); If you build a program that has these write calls in debug mode, and then run it di...
1479 byte By
JoeR at 2008-2-26
Does anyone know why the following doesn't work?interface B is derrived from interface A, and should contain an implicit conversion from B to Aerror CS0309: The type 'constraint_bug.interface_b<T>' must be convertible to ...
Hi, I can't find the option to set the maximum line length and display the print margin. I would also like to know if the auto-formatter automatically reorganizes the code so it doesn't exceed the line length? Can someone help?
Hi, I have a situation with multiprojects created using VS IDE with different namespaces as mentioned here. I first created a windows application with the name App1 and i created another new project with name App2 and added to the exisiting project. ie., App1 Now, all i want is how can i ...
2269 byte By
DeKale at 2008-2-25
The new generics in C# 2.0 are really breath taking, but I've got some problems with sorting a Generic List. I've got a List<KeyValueType<TKey, TValue>>, so this is a list containing another generic type. Now I would like to sort this list by the TKey type of the ...
Hi ! I am new to C# (and programming generally) but I enjoyed working with C# Express 2005 Beta 1, and made some dlls for some software I already have. This required using the properties interface to build and debug.I recently installed Beta 2. The compiler works fine, but when I click the ...
723 byte By
ppl1 at 2008-2-25
well...i created a user control - <form id="Form1" encType="multipart/form-data" runat="server"> <table> <tr><td><input id="filename" type="file" name="filename" runat="server"></td> </tr> <tr><td><input id="uploadBtn" type="button" ...
C++ is the next iteration of C, hence "C++" But why did they call the next one C#??
I'm currently trying to use generics to make my interfaces a little bit more flexible. Unfortunately I seem to have hit a problem with the compiler complaining when I try to use an interface as an input parameter, if that interface requires a type to be defined. I'm not sure if I explained ...
sometimes when I inherit an interface I get the tool tip asking me to hit tab to implement. But other times I dont. Sometimes when I dont get the tool tip I erase the inherited interface and replace and I get the tool tip. the behavior is erratic and makes no sense. Any Ideas?is there a ...
Can anyone tell me how to add my user name to a Visual Studio Express product after activating the product?For example, in Visual C# 2005 Express Edition Beta 2, when I select 'Help' from the Menu bar and choose 'About ...' in the upper-left corner it says: Licensed to: Unknown User Name.I ...
Hi,Why does the code below not work? I've constrained the T type of the Bar class to be a "Foo" but I still get compiler error "Error 1 'T': cannot provide arguments when creating an instance of a variable type" (beta 2 - 8.0.50215.44). Since I've constrained T to be a class rather than ...
850 byte By
LTR at 2008-2-23
I am new to C# Express and can't seem to get the snippets to work in files that are part of a project. If I open a .cs file by itself, that is, not as part of a project, then the snippets work fine. However, if I open the same file as part of a project, then the snippets won't work.Let's say ...
This may not be the best group to ask in as the question is about the beta, if there is a better place please point me to it. I've had beta 1 installed, after a re-install of the OS this weekend I installed beta 2. I opened a project that I had written with beta 1 and tried to compile it, ...
Hi Peter, Thanks for responding. Converting to string doesn't help me convert the code unfortunately. Thanks!
is it just me, or is the 'stop build' button not enabled for cs project builds? incase it is - does anybody know if this is supposed to stay that way in the final? WM_THX thomas woelfer http://www.die.de/blog
765 byte By
Smarty at 2008-2-22
On the one hand:Given the generic class declarationclass List<T> {...}some examples of constructed types are List<T>, List<int> and List<List<string>>.A constructed type that uses one or more type parameters, such as List<T>, is called an open constructed ...
Can someone tell me the primary differences between C#.Net and C++.Net? If I learn one, will I necessarily be learning the other? Which one would you recommend that I learn first? Currently, I know C++ but I program professionally in VB6. I am looking to make the transition into the Visual ...
I am actualy testing C# in VS2005 and i compare fonctionalities with C++ that i used in VC2003. I found that in a C# project, there is no property pages for files like in a C++ project. I used the property page in C++ project to perform custom build : compile a text file to resource using ...
I'm processing large binary files. These are PCL files, and I'm looking for page boundaries. I want to store the position of each Form Feed, which in PCL is decimal 12, hex 0C. However, that byte can also exist as part of a raster or other binary structure.So I loop through the file, and when ...
1092 byte By
bzurer at 2008-2-21
"Generic methods should provide type parameter" http://www.gotdotnet.com/team/fxcop/docs/rules.aspx?version=1.32&url=/Design/GenericMethodsShouldProvideTypeParameter.html public sealed class ReflectionAgent{ public static T GetCustomAttribute<T>(MemberInfo memberInfo) { if (memberInfo ...
I tried to connect the SQL server express from C# Express beta 2 and got some error.In the "Add Connection" Dialog the options I gave are:Data source: SQL server DatabaseDatabase file name: C:\Program Files\Microsoft Sql Server\MSSQL.1\MSSQL\Data\tempdb.mdf Is it right? else What to give ...
Hi, I have a situation with multiprojects created using VS IDE with different namespaces as mentioned here. I first created a windows application with the name App1 and i created another new project with name App2 and added to the exisiting project. ie., App1 Now, all i want is how can i ...
270 byte By
psp at 2008-2-21
Hi, I need create a CheckBox control .In this I want the checkBox Glyph with an image of 25x25 over it and the text should be displayed as it is,The behavior of the CheckBox control should be as microsoft check box control. So how to format the checkbox glyph???
1303 byte By
MikeF at 2008-2-20
I have a question about a line of code. I was looking at some code on how to implement ftp in .net 2.0 and saw this line of code.response = (FtpWebResponse)request.GetResponse(); my question is, why is FtpWebResponse in parenthisies?Usually you only see parenthisies when you use a method and ...
I have tried every thread that I could find on search and have found no solutions for this yet.What I have is a very simple console application that is testing a BatchQueue from the CSLA Framework.When i make calls to ...
Hi, I have a situation with multiprojects created using VS IDE with different namespaces as mentioned here. I first created a windows application with the name App1 and i created another new project with name App2 and added to the exisiting project. ie., App1 Now, all i want is how can i ...