-
- Remove an object from the middle of an array?
by learning33
- 13 Replies
- Last post
by JohnWein
- I have an array Flower[] flower = new Flower[10]; Every object contains information. I want to remove flower[5] from the array and decrease flower.Length so it equals 9. Is it possible to do this
-
- C# and VB.NET, which can be learned faster?
by Artil
- 10 Replies
- Last post
by Gabriel Lozano-Moran
- Could anybody help let me know which language I should begin with C# or VB.NET
-
- New to C# - Quick Question about StreamWriter
by Jody Nichols
- 5 Replies
- Last post
by mwalts
- I have this chunk of code in the end of my program. The program reads a list of hostnames from a text file to a array of strings(proven successful) and then is supposed to write out the unavailable hostnames to another file (results.txt). For some reason it will create this file, but not write to it. Does it have something to do with it being in a catch Thank you.
foreach (string hostna
-
- if i have a code inside my class that s all messy and badly formatted and aligned, can I format it correctly
by rtaiss
- 2 Replies
- Last post
by rtaiss
- Is there an automatic shortcut key or command to align and format my code automatically: like the IFs and whiles are all the code is badly indented
Thank you
-
- Public properties and designer issues
by JohnM33
- 5 Replies
- Last post
by JohnM33
- Hello all
I recently tracked down a problem in my code, where the designer would give me the White Screen of Death almost all the time when adding a particular control - although it would sometimes be ok after a Clean, it would always die again after a rebuild.
After a ridiculous amount of detective work, the likes of which I hope never to go through again, I tracked it down to one o
-
- source code compromized..OMG
by osamaT
- 2 Replies
- Last post
by Matthew Watson
- Hi.. while i was googling for something.. i found a program called Dis#.. i downloaded it and tried it.. OMG... it opened my source code.. just like that... so i went online again and downloaded a source code protection program.. and OMG the Dis# open the source code of the protection program.. im new to this... so guidance will be appreciated.. thnx alot
-
- How to use List<T> with Generic Class Class<T>
by TerryMohre
- 7 Replies
- Last post
by Figo Fei - MSFT
- I would like to have a collection of the GenericT class
How
public class GenericT <T>
{
T t;
public T Thing
{
get { return t; }
set { t = value ; }
}
}
private void doThis()
{
List < GenericT <T>> list = new List < GenericT <T>>(); //I know this won't work
list.Add( new GenericT < string &
-
- execute program
by guilhermecvm94558
- 5 Replies
- Last post
by guilhermecvm
- How to execute "msiexec /I ...." i tried through Process.Start, but it doesn't work
-
- Viewing runtime errors
by Ray C
- 7 Replies
- Last post
by Figo Fei - MSFT
- I'm currently using NotePad to write a simple C# application. I simply use cs.exe to compile my windows application.
How can I view the runtime errors when using this approach The compiler does not catch the runtime errors obviously. My .exe simply stops executing without any error messages.
I do notice one thing, in my task manager I notice that a process called DW20.exe runs for a brief se
-
- regarding the application size
by mohasad
- 6 Replies
- Last post
by TilakGopi
- hi , i have been in the development of Smartphone game applications. after the creation of the setup file for my application , the size of the setup is around 500 KB . is dis creates any problem, or it is ok to run on the device . thanks sadiq
-
- Is this possible in C# or in any other language?
by srisha
- 5 Replies
- Last post
by TilakGopi
- I have a class B which is derived from class A. I also have one more class C which is unrelated to A & B. How can I access all the data of C from an object of B Is it possible without interfaces
-
- Very basic question
by newbie_007
- 5 Replies
- Last post
by Mohamed Shifaz
- Hi,
Can anyone explain the below given pattern of using if-else
Code Snippet
bool disposing = false;
if(disposing)
{
do something;
}
if(!disposing)
{
do something;
}
How is above given snippet different from the below one
Code Snippet
bool disposing = false;
if(disposing == false)
{
do something;
-
- Can you create options dialogs like in most Windows programs?
by compro21
- 3 Replies
- Last post
by compro21
- Is there a way to pop up an options box in a program that will "freeze" the program like most windows programs do When you open the options dialog in Word, for instance, it will not let you get back to word document without hitting ok or cancel. If you try to click back to the document, the program will bing and the window will flash. Also, the window always stays on top - which is a nic
-
- File I/O Question- How to check if file is still being copied
by mEt
- 5 Replies
- Last post
by H. (¶¬) Tony
- I have an application that I am writing that actively monitors a folder for video files. When a video file is inserted into the folder the program then takes that file and converts it to my desired format, outputting it to a separate directory. Now, if I start my application with video files already in the folder it converts them, no problem, and begins monitoring the folder for new video files to
-
- Run Windows Application From Windows Service?
by TheMaj0r
- 12 Replies
- Last post
by kpthekiller
- Hi,
I have made a windows service that has a timer checks for a certain time to remind me. Now the time is reached so i want the service to display an alert!!
I have made a windows app that shows the alert but when i run it from the service it runs but not GUI displayed!!!
I can see it runs from the Task Manager but i cant show the form.
So is there any way to dispay i GUI alert from a
-
- List<> casting
by Kernel Panic
- 5 Replies
- Last post
by JDPeckham
- I have one property, this receive a object, ArrayList or List<>. How i can get the first item in this list In Array work's perfect, but, in List<> i don't know how to procced. See the code: private object pDataSource; public object DataSource { get { return this .pDataSource; } set { this .pDataSource = value ;
-
- How To Get Excel Object From Process?
by MrZap
- 8 Replies
- Last post
by Jigar Patel
- Hello, Using following line i got all running Process/Instance of Excel : Process .GetProcessesByName( "EXCEL" ).
But after this i don't know how to get object from process/processid.
-
- simulating hardware
by AMSS
- 4 Replies
- Last post
by AhmedSabry
- Hi All I want to know if there is any useful links that can help in building a hardware simulator using C#, if you know a place where I can get information, plz help thx
-
- Problem with C++ to C#?
by Le.W
- 5 Replies
- Last post
by Le.M2P
- Hello, I have tried to realise the functionalities of an c++ program in a new c# application. So I built a dll from this c++ program. But I found that this C++ program uses another C library, and one of their methods can not be executed correctly, if it is indirectly called by C#. For example: MyCPP . cpp is the C++ program which I want to develop in C#. MyCPP . cpp has a parameter(Object) MyInter
-
- Recursive function error
by singlenipple
- 1 Replies
- Last post
by micvos
- Hello,
I wrote a function to that reads a file in a folder and then does something. the function is recursive in case of subdirectories. just like that:
public void ProcessDir( string sourceDir, int recursionLvl)
{
TextWriter tw = new StreamWriter (textBox2.Text + "\\FileNamesGen.txt" );
HowDeepToScan = domainUpDown1.SelectedIndex;
if (recursionLvl<=HowD
-
- C#, IComparable interface
by recherche
- 5 Replies
- Last post
by Frank Boyne
- Hola!
I tried working on IComparable interface in the follwoing code snippet, it's working fine! But I don't get how the method 'public int CompareTo(object ob)' in Myclass returns 0
What is the value of v, or for that matter x I think x is assigned to v in the constructor, which isn't called perhaps to avoid compiler warning And x has its default value 0
But how the value of
-
- Move objects between System.Collections.List
by fibonacci1123
- 6 Replies
- Last post
by Sean Hederman
- Hi! I have two Lists (System.Collections) and I want to move (or copy) objects from the first to the second one. This is my code for(int x = 0;x < list1.Count;x++) { list2.Add(list1[x]) } But every time C# gives this error: Object reference not set to an instance of an object. How can this problem be resolved Thank you!
-
- [Question] View value of a database on a label
by kwnds
- 2 Replies
- Last post
by Jose Escrich
- I had created a data base on visual c# (i had installed sql server 2005) and now i a few questions:
-How can i change a label text to a database value For example:
labe1.tex = "Value on Database X, Table Y, Row 3, collun 1"
-How can i add a new value on a collun
-How can i remove a value on a collun
-
- BitArray Constructor ?
by JOOP GP
- 2 Replies
- Last post
by Figo Fei - MSFT
- Hello,
I will try to explain me in Englishˇ
So, i use BitArray :
byte [] Alarm = new byte [1];
Alarm[0] = 0xff;
BitArray b = new BitArray (Alarm[0]);
=> Size of b : 8 bit
But if i make this :
byte [] Alarm = new byte [1];
Alarm[0] = 0x01;
BitArray b = new BitArray (Alarm[0]);
=> Size of b : 1 bit.
I do'nt understant this.
Coul
-
- Beginner in need of urgent help!!! static problems
by canephalanx
- 7 Replies
- Last post
by Suprotim Agarwal
- ok so here's the situation.. I have Form1 where i have textbox1 and where i declared it as static so that it can be accessed outside Form1 then I have Form2 where i have a button that appends some text to textbox1 in Form1. but when i look at the designer in the IDE i notice that textbox1 is not there anymore. but when i de-static textbox1, it shows up in the designer but then i can't access it on