Answer Questions
13117 Which book to start with??
Okay... I've got a variety of different books and tools to learn C# with. The problem is the one that is my FAVORITE is using an old rendition of the language (from 2002) and an old IDE. "Microsoft C# Game Programming for the Absolute Beginner" My question is: is it harmful to use OLDER books to learn a language Yes, I have newer books like "Teach yourself Visual C# 2005 in 24hrs" as well as videos from VisualStudio.Net and Prentiss Hall's book, but when it came to raw coding I found the former book more useful and more fun. But, am I gimping myself by not using the newer 2005 books I've come to also notice that the newer books seem to focus a LOT more on working within Windows Apps, which I think is a bit c ...Show All
Alxenen Accessing methods - Error: is a 'method' but is used like a 'type'
Okay... this is my second thing I'm ever tried doing on Visual C# so I'm a bit newbie. I'm creating a method that prints text on a console application and try to if access from main method and I get this error: Error 1 'Collections.Program.starmenu()' is a 'method' but is used like a 'type' Here is the code: namespace Ctest { class Program { static void Main(string[] args) { starmenu newMenu = new Ctest.Program.startmenu(); } public int starmenu() { int choose = 0; do { Console.WriteLine("1 – Option 1"); Console.WriteLine("2 – Option 2"); Console.WriteLine("3 – Option 3"); Console.WriteLine("" ...Show All
Clayton DuVall How does VS 2003 pick the correct dll's to link to while compiling?
I am using VS 2003 with Nunit. I have both the 2.0 and 1.1 assemblies of nunit on my machine. I have the following directories - >>dir | grep -i "nunit" 06/16/2006 11:05 AM <DIR> NUnit 2.2.8 //built with 1.1 framework 06/16/2006 11:06 AM <DIR> Nunit-Net-2.0 2.2.8 //built with 2.0 framework My GAC for Nunit looks as follows - >>gacutil /l | grep "nunit" nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77 Whenever I do a fresh checkout of an .NET 1.1 application, all the references to nunit.framewor ...Show All
Gordon Hempton Add Web Reference
When I add a Web Reference from Visual Stuido it can take upto 4 minutes to complete (build the proxy). This is for a very simple webservice with only three web methods held on the same machine. Has anybody got any ideas why this should take so long Thanks Dave Yes I do. There are a total of 20 projects in the solution, two of which are web projects. IIS is installed, but this is just a simple Web Project using the built-in server. Do you have both the web service project and the project that consumes the web service in the same solution Just curious, do you have IIS on this box or are you using t ...Show All
Eric Wisdahl real-time use of Indexers & Properties...
hai, I need help regarding Indexers & properties, what is the use of properties & indexers, and how it is applied in real-time applications .. thanks.. " if a member of a class is declared as PRIVATE, then it can't be accessed by the code outside the class. But properties break this concept,so no encapsulation or data hiding can be achieved. If properties are defined for the particular class that has private members, we can access the PRIVATE members using properties from outside of the class. Won't this be a *drwaback* " Remember, that Properties are just METHODS that are handled as properties in C#. For example, a get and set Property MyProperty will be compiled to get_MyProperty and set_MyProperty -methods i ...Show All
BrianMcCashin recommended C# books
I am looking for a good C# 2.0 book and thinking of buying Jesse Liberty's book: http://www.amazon.com/Learning-2005-Started-NET-Programming/dp/0596102097/ref=pd_sxp_grid_pt_0_0/104-6107546-6291107 ie=UTF8 If you have read this book, how did you like it Thanks, John give this one a look http://www.amazon.co.uk/Beginning-ASP-NET-2-0-Chris-Hart/dp/0470042583/sr=8-4/qid=1161605863/ref=sr_1_4/026-2705790-1462017 ie=UTF8&s=books Welcome to the MSDN Forum and thanks for participating! This is not the place to talk about asking for book reviews. Please look at Amazon and read some reviews, this allways helps. But here are some books i can recomma ...Show All
redfish How to build a global connection with ODBC?
I could not create a global connection with ODBC. It needs to identify in a method, not in a class out of a method. In this case while program running, it builds and destroys million connection. In every loop in the called method creating a new connection then doing something then closing it. This condition takes so so much time. I want to optimize this. So at first I should create a global solid connection. Program should do own work with out creating new connection but with using the connection. Finally when finishing the program, connection will be closed. Could you help me Regards... I can write my codes. But I wish explain the condition. At your code, when the program counter come at "foreach" it will d ...Show All
BuddhaDave project properties file(s) and web references
A project Im working on was updated by someone else (via source control) and apparently they created some properties files when they added a reference to a web service. However, i think they didnt do anything explicity to do this, but when i updated my code with these changes, I didnt have these properties files and hence my build failed. Why would adding a reference to a web service cause data to be saved in a properties file and how can I avoid it What's the name of the properties file that you were missing Anson ...Show All
JGreever Good examples for interfacing c# with sql server on the web?
Hello, I am looking for some good examples for managing data in a database with c#. I need the basics, preferably relating to using c# in visual studio. Can anyone point me to some decent material on the web Thanks, Toben On this same question for Managing Data with sql..... Is it possible to generate a "TEMPLATE" to pull the data from sql (using C#) into a Online WEB PROGRAM. Basically the data that I will have to work with changes VERY frequently. The online program is used by many and needs updated constantly, so I would like to find a way to build a CSS (or similar) to pull that changed data frequently without having to change multiple web pages. I am a newbie to C# but could really ...Show All
DudleySoft Move to a next window after pressing a button
Hi, Basically, the title says it all. How can i move to a next window after pressing a button. I'm trying to make a calculator. Thanks in advance! next Window in where your application or in the C# IDE Can you explain a bit more please well, if I undrestand correctly, you wish to open another window in your application correct (another form) if so, simply create an instance of it and show it to the user. Example: Form2 theSecondForm = new Form2(); theSecondForm.Show(); //or: theSecondForm.ShowDialog(); the showdialog() puts the form in question into the model dialog meaning that the previous forms opened are not accessible until this form is closed and only then can you access t ...Show All
JavaBoy How to Exract SQL minute data to houly data in C#?
Hi I have a SQL table that has data filled with million records and the date is in minutes it looks like :- RowDateTime Meter 1 Meter 2 Meter 3 25/05/2006 02:49:00 1220 450 489 25/05/2006 02:50:00 1223 470 500 25/05/2006 02:51:00 1227 490 511 25/05/2006 02:52:00 1230 510 522 25/05/2006 02:53:00 1233.5 530 533 25/05/2006 02:54:00 1236.9 550 544 25/05/2006 02:55:00 1240.3 570 555 25/05/2006 02:56:00 1243.7 590 566 I want to make a C# code or SQL query to the above table and convert the data to houlry by summing Meter1,Meter 2 and Meter 3 to be the average. I want to import al ...Show All
Wilke Jansoone directoryentry
hi i have a problem with the first argument of this methode directoryentry.Invoke( ); where can i find the methodname that i should post as the first argument what the available methodename You'd use the name of the method (String) for the particular Active Directory object you have selected. For example, a user object has a "ChangePassword" method. Use InvokeGet/InvokeSet to read/write properties. Property and method names appear to be documented here . Hope this puts you on the right track, I couldn't try this myself... Try: obj.Invoke("ChangePassword", "", "NewPassword") Is this stuff working I couldn't try it out myself... ...Show All
thepuppet How write over COM and LPT
I'am developing a sticker printing software. In my company we have printer with both COM and LPT port. So my software must support both. For printing, I create FileHandle to send data to printer. This method works both COM and LPT but I can't learn if printer finished its job. with this methot printer gives overflow error when I try to print more than 50 sticker. My code like this... public const Int32 GENERIC_READ = -2147483648; public const Int32 GENERIC_WRITE = 1073741824; public const Int32 OPEN_EXISTING = 3; public const Int32 FILE_ATTRIBUTE_NORMAL = 128; public const Int32 NOPARITY = 0; public const Int32 removed = 0; [ DllImport ("kernel32", SetLastError = true)] public static extern IntPtr CreateFile ( string lpFileNa ...Show All
drew_p c# and fortran
Hi, I'm trying to use Fortran routines in c#, for that, I think, I need to create a dll from the fortran source, and then import and declare the routine in the c# code. This is what I'm doing: Fotran code: SUBROUTINE KEPLER (S) IMPLICIT NONE !DEC$ ATTRIBUTES DLLEXPORT :: KEPLER !DEC$ ATTRIBUTES C, REFERENCE, ALIAS:'KEPLER_' :: KEPLER INTEGER I1,I2,K CHARACTER*1 S Command line for dll generation: gfortran -c kepler.f gfortran -shared -o KEPLER.dll This is how the dll is imported: [ DllImport ( @"KEPLER.dll" , EntryPoint = "KEPLER" )] public static extern void KEPLER( string output); when I run my application, where I call the KEPLER(S) routi ...Show All
CodeDjinn using vb6 component ?
Hi, Is there a way to use vb6 components in C#, just like in old asp (Server.CreateObject)... I tried with Activator.CreateInstance but didn't worked...is continue to as kfor the reference... OK, Now it worked.. Type objAddType = Type.GetTypeFromProgID("ACEGAC.clsAdmDBConsultas"); //Create Instance object objConsultas = Activator.CreateInstance(objAddType); //Make Array of Arguments object [] myArguments = { 1 }; object c; c = objAddType.InvokeMember("ConsultarAgendamento", BindingFlags.InvokeMethod, null , objConsultas, myArguments); MessageBox.Show(c.ToString()); But there is still a problem, how can I make to show the values of the c object... Like in V ...Show All
