-
- c# language specification 1.2
by Xettabyte
- 2 Replies
- Last post
by Peter Ritchie
- I have a comment / question, but more a comment.
The C# language specification 1.2 is one of the most confusing documentations I have ever seen for a programming language.
Is there a supplement to this documentation. I am asking because at www.gamedev.net they are having a c# workshop and they are trying to make a supplement for more beginner users, but i was wondering if there was
-
- How to get Debug output from specific window (app)
by Martin Ortiz
- 5 Replies
- Last post
by OmegaMan
- In a separate app, I will output error messages like this
System.Diagnostics. Debug .WriteLine("error message" );
In another separate winform app , I want to monitor the error message of first app (the first app, is actually going to be a service, so it can not have any GUI windows).
How do I monitor / retrieve the Debug data (I don't see how to do this with List
-
- migrating from fortran 90 to c#
by zorank
- 5 Replies
- Last post
by IsshouFuuraibou
- Dear C# enthusiasts,
I recently fell in love with .NET and firmly decided that my future development will be on windows (to the horror of all UNIX, LINUX people I work with ). .NET is a way to go! I even armed myself with 5-6 books on the subject...
I have a very long fortran 90 code (like 99% people in science do). What would be the best way to change this code into c# (appart from
-
- unable to add existing project to a solution
by Mike19
- 8 Replies
- Last post
by MichaelYarbrough1975
- Hi All.
I created a solution and am trying to add an existing project to the solution.
I'm getting the following error:
Operation could not be completed. The project file ... cannot be converted. See the conversion report for details.
Also, there isn't a conversion report as far as I can see.
There's just an ok button.
Thank you!
-
- two functions with same name done well in C#,but not in VB.NET ....!
by My Vizai
- 6 Replies
- Last post
by AmazingAnt
- Hi Experts, I've written two functions in a C# class as below
class exampleCS {
public int a,b;
public int add() {
return (a+b); } public int Add() {
return (a+b+10); } } Please observe that the function names are same but differ in case... I compiled the code and geneared a DLL. I started developing a VB application now... I added the reference of the dll (Developed in C#) t
-
- Using Console.Writeline in Program.cs of a windows app
by Andy_T1
- 1 Replies
- Last post
by OmegaMan
- Greetings, I have a windows app that when the user supplies command line args, I want to run an automated functionality without any UI. As part of that, I want to be able to alert the user using Console.Writeline. However, it seems that Console.Writeline is not available for Windows apps. Is there a way to output stuff to dos prompt (console) from a windows app Thanks!
-
- Attributes: obtaining info about a property through the attribut assigned to that property
by elodie23
- 2 Replies
- Last post
by OmegaMan
- Hi,
I was wondering if there was a way to obtain information about a property (e.g. is Type) through the assigned attribute
My Property:
[ DesignerProperty ( "Name" )]
public IEntityCollection SomeProperty
{
get
{}
}
My attribute class:
[ AttributeUsage ( AttributeTargets .Property )]
public class PropertyAttribute
-
- error CS0103: The name 'eLABEL' does not exist in the current context
by Boyd564852
- 3 Replies
- Last post
by Skippums
- Code Snippet
public enum vcidtatype
{
eLABEL, eENGUNITS, eALSET, eFIDADR, eLANADR, eBYTESIZE, eFLOATSIZE, eINT16SIZE, eINT32SIZE, eFILLERBYTES
}
public partial class StoredProcedures
{
I declare an enum then begin the stored procedure routine.
Anywhere inside this block of code the use of an enum tag results in the error CS0103, does not exist in the cu
-
- switch/case with string
by Greg McPherran
- 12 Replies
- Last post
by Coder2048
- Does C# optimize switch/case for strings in any way such that it is more efficient than a series of if-else(s) For example, the C++ compiler can use jump tables for switch/case with integers. (Note: this is not a C++ vs. C# focus, I am just using what I have seen the C++ compiler do as an example of an optimization).
Thank You
-
- Problem understanding code
by Spartaner151
- 5 Replies
- Last post
by The_Real_MBu
- First of all I'm a beginnner in C#.So that yesterday i found this code in a book and noticed that actually I've still got problems to understand the whole code.Especially this line
return i * Potenz(i, --j); My question is now, Why can i not write instead of this line my line
reurn Potenz(i,j);
But after compiling of my version an error appeared.Maybe one of you can explain me t
-
- Method on array of custom class?
by David_N
- 4 Replies
- Last post
by jgalley
- Hi, I have a custom made class, lets say MyClass{Guid thisVariable; int thatVariable;}. In my program I house a array of theese object. (MyClass[] myArr = new MyClass[5]). I now want to find the perticular MyClass object where it's thatVariable-member matches a given value. Something like this would be good. myArr.Find(123); How would i go about to do this. My option is ofcourse to do a method th
-
- um... what's this bit of code do/called?
by George F DArcy
- 2 Replies
- Last post
by Matthew Watson
- I saw this code today (ive added line numbers);
1. Func<int, int> fib = null; 2. fib = n => n > 1 fib(n - 1) + fib(n - 2) : n; 3. Console.WriteLine(fib(6)); // displays 8
Line 1; I don't get at all. Is that a delegate
Line 2; I don't understand this part "n => n > 1"
Line 2 converts to;
if (n => n > 1)
{
fib =
-
- Generic methods
by Szdnez
- 2 Replies
- Last post
by TaylorMichaelL
- Hello , I want to define some generic abstract methods in a base-class. The children of the base-class that implement such methods should not be generic. For example:
Code Snippet
public class BaseClass { ... public abstract T MethodA<T>(String test) where T : BaseClass; public virtual T MethodB<T>() where T : BaseClass { // do something ... return this;
-
- How to fix the error: HRESULT: 0x80070005 (E_ACCESSDENIED)
by RazrNL
- 4 Replies
- Last post
by RazrNL
- Hi there, I have made a form with a WebBrowser. When an event is triggerd the program will look in the source code for a certain string and return this (for further navigation). Now i'm stuck on this error. First let me show some examples: I navigate first with this code:
Code Block
webBrowser.Navigate(link, "MainFrame"); After that the following code is executed:
-
- Time out error
by Ashok Teli
- 2 Replies
- Last post
by Figo Fei - MSFT
- I have code as follows -
href = "URL"
// Create a request for the URL.
WebRequest request = WebRequest.Create(href);
//Set the USerAgent
((HttpWebRequest)request).UserAgent = "msie";
// Get the response.
WebResponse response = request.GetResponse();
Sometimes the code "WebResponse response = request.GetResponse();" is giving time out e
-
- Anybody can help me for Window hook?
by CagriYuceturk
- 4 Replies
- Last post
by Sanophy
- My Windows App is using keydown event(F1) but my form's ShowInTaskbar property is False.As a result my application cant get the keystrokes i know i need to use Hook but unfortunately i dont know how to use! please help me Thank you
-
- Working around "out of memory"
by gbereny
- 13 Replies
- Last post
by Peter Ritchie
- Hello, I have some C# code in an application that consists of C# and C++ code. The C# code I'm looking at calls the constructor for a Bitmap object if the user requests a particular operation. The C++ code also runs or not based on user-requested operations. The Bitmap constructor call sometimes generates an "out of memory" exception or on occasion, a "parameter not valid"
-
- How to specify DLL library path in CSC command line?
by R2D2RABEAU
- 5 Replies
- Last post
by Peter Ritchie
- .NET 2.0 Hi I am getting a CS0246 error regarding 2 DLL libraries. So I tried the following: csc /target:exe /reference:"C:\Program Files\myFolder\myLib1.dll", "C:\Program Files\myFolder\myLib2.dll" Code.cs but that does not work either. Any suggestions Thank you for your help,
-
- Bad link on the Visual Studio Start Page
by PhillipBlanton
- 6 Replies
- Last post
by nevski
- On the Visual Studio Start Page, the "Unified C# 3.0 Specification Now Available" link is broken. It is...
http://download.microsoft.com/download/3/8/8/388e7205-bc10-4226-b2a8-75351c669b09/csharplanguagespecification.doc
But it should be ...
http://download.microsoft.com/download/3/8/8/388e7205-bc10-4226-b2a8-75351c669b09/csharp%20language%20specification.doc
-
- Why does COM interop behave different in VS2005?
by wdahl99
- 1 Replies
- Last post
by SpiritDevSS
- I have created may libraries using C# VS2003 and then used COM interop
to register the type library (regasm mydll.dll /tbl mydll.tlb
/codebase) and have created excel add-ins as a wrapper to the original
.NET library. Everything worked great.
I have since upgraded to VS2005 and the same projects that had no
problem in the past now do not work. To make it even more
complicated, they all w
-
- Generics are throwing OutOfMemoryException....Any idea...?
by Tango-Charlie
- 2 Replies
- Last post
by Peter Ritchie
- Hi Guys, I was learning generics and trying to learn Generics collection in System.Collection.Generics namespace...I did following thing.Its throwing error OutOfMemoryException......Does anyone have any idea on this.... .My machine is running on Windows Xp/SP2 and .NET 2.0. class GenericListApp { static void Main(string[] args) { Console.WriteLine("This program tests the Gen
-
- Losing value after calling method for use with another
by NoEgo
- 6 Replies
- Last post
by FavorFlave
- I am trying to figure out why JAAAlbum.ProductID is null when passed to my AddNewProductRelationship_Album_Track method in my loop http: / / www. webfound. net/ forum_ posts/ addproduct. txt Basicaly what's happening is the AddNewProduct is called for the album and JAAlbum product is created then values are saved to the database with the following lines: JAAlbum.Save(1, TransactionAbstr
-
- Make an Enumeration of Times (00:00 to 23:30)
by PlaTyPuS8
- 8 Replies
- Last post
by decyclone
- Hi!
How can I do that I want to put these Times in a combobox....
Thx for help!!
PlaTyPuS
-
- Two remote desktop users running one app
by Yeshia
- 2 Replies
- Last post
by Yeshia
- I have an application that is on a server where two thin clients login using remote desktop. Both are running the same application. Every now and then one of them has problems. Certain fields freeze up and stop updating, but the screen as a whole is not frozen, as they can hit the close button and reopen the screen and all is fine. I am wondering if there is a problem with two users running the sa
-
- Passing values into EventArgs when a button is clicked
by Penny111
- 6 Replies
- Last post
by Penny111
- I am currently building a shopping cart application using C # in VS2005 where there are 10 items to select from. There are 10 "Add to Cart" buttons, when clicked, will trigger a single method. That single method will either add a row (new item), or update the quantity (old item). In my existing code, i loop through each row in the DataSet to determine whether i should add a row or update