-
- Shorter array declaration and definition
by Azurewrath
- 6 Replies
- Last post
by Peter Ritchie
- Hi all, After a long time I can post again! It was due to the still existing IE7 problem. Is there a shorter way to do this: int [ ] intArray = new int [ 5 ]; I am wondering why we write int 2 times One of them is to define the type, and the other is the constructor Can we do the same like this: int intArray = [5] Thanks, aw
-
- Replace text in a .html or .txt file
by Anonymous564381
- 6 Replies
- Last post
by TilakGopi
- Hi,
I need to:
1. Open a file (either .txt or .html)
2. Then search for some particular text like &tag&
3. Replace this text with the text from a textbox in the form.
4. Repeat steps 1 and 2 for various &...&
5. Save the new file as something else.
Step 2, 3 and 4 are my biggest problem - please help!!
-
- C struct of delegates is clobbered when one is called
by Peter N.585670
- 2 Replies
- Last post
by Peter N.
- I'm passing a struct containing delegates to an native call in a DLL that wants a struct full of function pointers. The values it receives are all valid. However, when execution returns to the native DLL from the managed method (which runs flawlessly), all the members of native struct seem to get clobbered.
What I can't figure out is whether this is because they're all getting garbage colle
-
- how to hide the task bar in c# ????
by iskiskisk
- 14 Replies
- Last post
by Martin Xie - MSFT
- hii
how are u
i maked a very good programe
but !
i wonna know how to hide the task bar
can u help me
i maked messanger with server and client
and i added buttons to open cd roome and close it
and i suceed
but i failed in hiding the task bar
so can u help me
good bye
-
- Error Message in VS 2005
by Armand2
- 6 Replies
- Last post
by Citizen on the earth
- Hi everybody i have setup various programms on my computer and then when i ve tried to relaunch VS to modify applications graphically i ve got the following error message : One or many errors have been encountered during the load of conceptor those errors are reported below some of them can be corrected by regenerating again the solution other ones with coding modifications a Microsoft.Win32.Regis
-
- Accessing files over network
by VRATZ
- 4 Replies
- Last post
by Paul Ruiz Pauker
- can somebody assist me how to access the files over the network in a web application using C#. I need to copy a certain file from server to local machine in a web application using C#, can somebody help me regarding this.
thank you
-
- IDE Crashes when trying to accessing Database
by Peter Calvert
- 4 Replies
- Last post
by Suma Sushilendra MSFT
- Problem:
Visual Studio 2005 IDE Freezes then crashes.
Causes:
Click on View \ Server Explorer,
Try to open a Dataset in the Solution Explorer,
Try to create a DataBase Connection.
So Far I have:
Proved i can connect to the DataSource with MSMSE,
Compiled and Ran the WebApp and it still runs fine (including database connections),
Instal
-
- typeof(A<>) and compiler error
by Anton V. Ruzhov
- 2 Replies
- Last post
by Karioth
- hi, I wrote classes:
Code Snippet
class A { } abstract class A<T, U>: A { } class A<T, U, V>: A { }
then I'm trying to get instance of A<T,U,V>: static A GetA(Type t, Type u, Type v) { Type a = typeof( A <>).MakeGenericType(t, u, v); return (A)Activator.CreateInstance(a); } That func doesn't compile with error "The non-generic type
-
- Debug vs Release
by Grigs
- 12 Replies
- Last post
by OmegaMan
- Hello,
I have a Windows Forms application written in C# via VS 2003. It does 100% of what it should while in Debug mode. However, there is one thing it does not do when compiled in Release mode. There is an external .dll I have to connect to, to do a screen scrape of an AS400 application. The linking of it is as follows:
[DllImport("PCSHLL32.dll")] public static extern UInt32 hlla
-
- Help! Issues with Strongly-Typed Data Sets
by BLRisner
- 1 Replies
- Last post
by Mark Benningfield
- Hi, does anyone have a good resource for information about Strongly Typed Data Sets (the "handy" .xsd files) We are trying to use them in a development project including 4 different developers, and when we share them out we invariably get 'strange' errors such as this that we have no idea how to fix...
Error 1 The type 'PRODUCT_PLTFRM_SUBSET_STATUS' already contains a definition
-
- Create Background Process
by bklare
- 7 Replies
- Last post
by bklare
- Does anyone know how to create a background process i.e., I want the process to not be visible in the taskbar, or system tray. I am starting the process using System.Diagnostics.Process.Start(). If there is not a way to start a process this way, then does anyone know a message number I can send throught the User32.dll SendMessage() API to achieve the same result
-
- Unmanaged to managed code
by blemos
- 14 Replies
- Last post
by blemos
- I have funtion wich was written in C++ and has the signature like this :
"DWORD XPTO(BYTE **aux)"
I want to use it within C# code but the function has to be declared like: static extern xpto( aux )),
I dont know how to translate it!!!
Can Anyone help
Thanks a lot!
Barbara
-
- StandAlone Executable
by Joshua.Pumphrey
- 8 Replies
- Last post
by IsshouFuuraibou
- I am trying to build a c# win32 app that relies on no external resources or support libs. The idea is an independent application that can fit on a USB key or other compact portable storage device that does not require an install, registry registration, exc.. Just one file. Any Ideas or suggestions Is this doable in c# or would I need to do this in C or C++
Oh, and on the subject of compile
-
- params parameter must be a single dimensional array - (It is! Tell me it isn't!)<g>
by OmegaMan
- 13 Replies
- Last post
by Sam Roberts
- Wasn't the goal, and hope for .Net 2 / the next version of C# not to rely on boxing of objects For it is the cornerstone of Generics... typesafe arrays and no more boxing ! But one area was overlooked.....take for example this code using the params keyword public void Columns(params string[] ColumnNames) { ... } Nice convention! It saves keystrokes and makes code easier to use ...but it was not
-
- Multi-language solution
by Fatboy15
- 3 Replies
- Last post
by RizwanSharp
- In a multi-language (multi-project) solution, does each project have to come out as a separate EXE Or, can one project call functions in the other, whereby it all compiles to one executable
-
- Reg:Multiple inheritance
by sithanathan
- 10 Replies
- Last post
by Stefan Van Reeth
- Hi Guys,
Multiple inheritnce not supported in C# But we can achieve this using interface right.
plz find the code below.I have implemented multiple inheritance using interface
public interface coolbaby1
{
void caller();
}
public interface coolbaby2
{
void caller();
}
public class Multiple : coolbaby1 , coolbaby2
{
-
- jagged arrays 2
by Brett445
- 6 Replies
- Last post
by IsshouFuuraibou
- Sorry for making a new thread. The site wasn't letting me resond to the old thread for some reason.
When making a two dim array for use in numerical algorithms in C++, it's very useful to do it this way...
int rows=3; cols=4; double **matrix;
matrix = new double* [rows]; matrix[0] = new double[rows*cols];
for(int r=1; r<rows; r++) matrix[r] = &(matrix[0][r*cols]);
This is a p
-
- Visual Studio 2005 IDE crashes with C# projects
by ursrinu
- 13 Replies
- Last post
by Suma Sushilendra MSFT
- I¡¯m having this problem with VS2005 it crashes when I keep break point and start debugging with C# applications (console project, Web Projects, Windows Projects) and also existing projects. Strange thing is it works fine with VB.Net projects.
It comes as Microsoft Visual Studio has encountered an internal error
Re-installing and then installing Service Pack 1 did not make a di
-
- Opening a webpage from a Windows Application in C#
by Marco Peters
- 2 Replies
- Last post
by Marco Peters
- I've got a Windows Application with a form, how can i let a button open a webpage
Please reply, need help fast!
Marco
-
- 'System.OutOf MemoryException' - Please help
by polachan
- 11 Replies
- Last post
by Peter Ritchie
- Dear Sir ...Please help
Please help for the following error 'System.OutOf MemoryException' was thrown.
I given the following code to read a text file . But the above error mesage is coming
System.Text.StringBuilder sb = new System.Text.StringBuilder();
using (FileStream fs = new FileStream(FileName , FileMode.Open, FileAccess.Read))
{
using (FileStream fs2 =
-
- remove an item from a list while iterating through it
by MKBender
- 7 Replies
- Last post
by boban.s
- I have a sortedList, and I need to iterate through it, comparing it to a table with the updated data, and remove old items, what is the best way to do this I think what I have below will though an exception since I'm removing an item from the list that im iterating through, so how do I do this should I use a regular for loop instead
bool FOUND; foreach (Equipment tmpEQ in equipments)//r
-
- Help with: "Unable to cast COM object of type..." error.
by PhrankBooth
- 3 Replies
- Last post
by PhrankBooth
- I get the error below
when I call many of the HTML... components, such as
mshtml.HTMLAnchorElementClass or mshtml.HTMLDivElementClass. for example: foreach (mshtml.HTMLAnchorElementClass aAnch in aItems) When I do that the program dies immediately. and this error below is posted: Unable to cast COM object of type 'System.__ComObject' to class type
'mshtml.HTMLAnchorElementClass'. COM components
-
- Windows c code help please, thank you!
by EJohn
- 3 Replies
- Last post
by ahmedilyas
- I can't get the "result" to print out the answer.
Can you see why please
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Calculator
{
public partial class Form1 : Form
{
public Form1()
{
Ini
-
- Using public classes : error The type or namespace name 'answer' could not be found ]
by sums
- 2 Replies
- Last post
by decyclone
- I am a novice and am not getting what is wrong ( )
I have to use a class across multiple pages(I have made it public)
Whenever I try to reference the functions of the class from other pages, it gives me this error message:
CS0246: The type or namespace name 'myclass' could not be found (are you missing a using directive or an assembly reference )
I tried enclosing it within a n
-
- FileInfo.Delete question
by RobertAkiraWatts
- 4 Replies
- Last post
by RobertAkiraWatts
- I'm having what is probably, given my skill level, an extremely stupid issue with trying to archive a file. Essentially, customers are copying files to an FTP site. I'm building a windows service that detects new files, does a whole mess of stuff is done with the data in the files, and then archives them using the following:
Code Snippet
public void ArchivePO(string name, string pat