-
- Understanding structs/value types in C#
by Radha Mukkai
- 5 Replies
- Last post
by Mihailik
- I am trying to better understand structs/value types in C#. Structs do not support inheritance in C#. However, all types (value & reference) derive from System.Object. For example: System.Int32 inherits from System.ValueType (which is an abstract class), which then inherits from System.Object. Is there some "voodoo" happening inside the compiler that makes this inheritance possible
-
- convert Bitmap to Image
by imrankhanpathan
- 2 Replies
- Last post
by Nikolay Podkolzin
- Hi friends
I have a bit problem.
I am working in asp.net 2.0 with c#.
In my application,I scan fingerprint of user from scanner and display it in Image control.
Now my problem is that I dont know that how to insert that image in sqldatabase as image datatype.
Here is another way.
I have one class called sfr and it has one method to get image of finger and it return in Bitmap form
-
- Application settings lost upon new assembly
by Jef Patat
- 10 Replies
- Last post
by Mark Benningfield
- Hi all,
I'm facing the same problem as issued in this topic .
I tried the solution with ApplicationSettingsBase.Upgrade() but it doesn't work out. First of all I need to put System.Configuration in front of it, I don't know if this really matters. Second my intellisense only offers me .Equals, .ReferenceEquals and .Synchronized but no Upgrade.
My application is working correctly, I assig
-
- Incremental builds in Visual studio 2005 professional edition?
by jvnb.kiran
- 5 Replies
- Last post
by TaylorMichaelL
- Hi,
I am unable to see the incremental build property in Visual studio 2005 IDE
I was searching in project property pages -> Build -> Advanced button but the incremental build property is not available for setting
it is building entire solution every time which takes more time.
can any one help me
thanks in advance
Kiran
-
- simplest way to pass values.
by airwalker2000
- 14 Replies
- Last post
by airwalker2000
- Hi there, what is the simplest way to pass value from one place to another.
for example on an ascx page I have a sql select statement that is assigned to a string (string sqlText = "select * from users"
what I want to do is display that sql statment (not the result of the statment) in a text box on a aspx page.
what is the simplest way to do this.
ps: Im a be
-
- Calling base class method from GrandChild class method
by Navaneeth
- 2 Replies
- Last post
by Navaneeth
- Please see the following code snippet
Code Snippet
class BaseClass { public virtual void SampleFun() { Console.WriteLine("In base class SampleFun"); } }
Code Snippet
class ChildClass : BaseClass { public override void SampleFun() { Console.WriteLine("In child class samplefun"); } }
Code Snippet
class GrandChild : Child
-
- Question regarding Generics and Inheritance
by Rishi Jhaver
- 5 Replies
- Last post
by Stu
- Hi
I just started working with generics and am stuck at a basic problem.
Have a base class - BaseObject
Have 3 derived classes from this - User, Product and Site.
Now, I have a ReturnObject method that returns a generic of BaseObject (List<BaseObject>)
But I really am returning List<User> from this method
This is the code from User.cs:
public List<Ba
-
- Disabling auto-formatting in 2005
by Suo Myno-na
- 2 Replies
- Last post
by Baoping Zhang MSFT
- Hi,
Quick question about the VS2005 IDE: Is there somewhere where I can disable the autoformatting features I have been through the settings and options a dozen times and I have not found anything. I love intellisense, but all the autoformatting is annoying.
Thanks!
-
- Strings and Forms
by smalamas
- 4 Replies
- Last post
by Figo Fei - MSFT
- Hi there.
I have created two forms, which the first one (Form1) has one textBox
where the user writes down one string, named stringTest. Following, the
Form1 is hidden and the other form is being loaded. Is there a
way to use the stringTest string of the Form1 in the other form
I would really appreciate any help of you. Thank you in advance..
NM
-
- Assembly API?
by Veloz
- 3 Replies
- Last post
by H. Tony
- Hi there My company wants me to write a .NET application for them that they will distribute to clients. The program will work with one or more xml datasets (read only). Some clients will have just one data set, others will have multiple. To make distribution and use easier, my company wants me to "embed" the xml data right into the exe so it can all be shipped in one file. Upon startup,
-
- Passing a variable to another process
by REspawn
- 9 Replies
- Last post
by REspawn
- Hi,
Im trying to find out how i would pass a value, in this case a string, to another process
My app detects if another instance of it is currently running, if it is then it shuts down, but when the user opens a file with it i want to pass the string (filename) over to the exsisting window so it can open before this one shuts down.
Any help or a point in the right direction would be exce
-
- How to handle private variables?
by mshvw
- 2 Replies
- Last post
by Steve Py
- Hi, A fundamental problem is spinning through my mind for years. MyClass contains different private methods that all handle (read/write) specific private variables. My problem is this: how do I know what private method updates what private variable without having to look inside the method's code (and without having to comment that method what variables it modifies) I think it's no nice solution to
-
- My Buggy Noughts and Crosses Game
by PeteJM01
- 5 Replies
- Last post
by PeteJM01
- I decided on the spur of the moment to create a simple Noughts and Crosses game. Most stuff works fine now, but there are a few odd bugs in there... :(
Game is not correctly detecting that the whole field is full The square on the bottom right sometimes doesn't let you put anything on it at all ( note that this is after at least one placeing of a Cross on a different square) When I filled up
-
- Saving 8-bit Bitmaps
by Sam Pearson
- 1 Replies
- Last post
by nobugz
- I can save 24-bit Bitmaps, but the camera I'm using is only takes greyscale pictures, with pixel values ranging from 0 to 255. Is there a way I can save the Bitmap as 8-bit
-
- Developing web apps using VC#
by Kumar Venkat
- 2 Replies
- Last post
by Figo Fei - MSFT
- I am an experienced C/C++ programmer, although relatively new to the Microsoft environment. I have recently used VC++ (C++/CLI) to develop Windows Forms applications. I now have a need to develop a web application and I am looking for the right development environment and language. Ideally, I would like to continue working with C++/CLI to develop the web app. But someone cautioned me that this mig
-
- Is descendant of "Open" generic class
by Brian Rogers
- 13 Replies
- Last post
by Brian Rogers
- Hi Everyone,
Does anyone know how to determine if an instance is a descendant of an "open" generic class
e.g.
MyOpenClass<TData> : object
where TData : object
{
}
And
MyChildClass<TData> : MyOpenClass<TData>
where TData : object
{
}
And then I have an instand and want to know if it is a descendant:
myObject.
-
- Error while trying to run project: Unable to start program - Access Denied
by Raja Ramesh
- 3 Replies
- Last post
by Jandost Khoso
- I have installed Visual Studio 2005 in my mechine.
Then I just tried to create one windows application using c#.net .
It was successfully created and build also. But when I tried to execute by clicking F5 it is throwing error like " Error while trying to run project: Unable to start program Access Denied "
Please help me in this.
Thanks&Regards,
Raja
-
- Private Constructors
by Azurewrath
- 8 Replies
- Last post
by Azurewrath
- Hi, Anyone knows the use of private constructors. From what I can see, it doesn't make sense to use it right Thanks, Aw
-
- Video Duration
by covertx
- 1 Replies
- Last post
by JohnWein
- Hi all, I've been trying to return the duration of an AVI file for weeks now and I've not yet been successful!
I've looked out COUNTLESS different websites (many of them Microsoft) but haven't found anything that gives me a clear cut way of returning the duration of a file!
Is there ANY way this can be achieved simply I've downloads lots of different SDKs and none of them have helpe
-
- Completely dynamic method invocation
by bryanedds
- 5 Replies
- Last post
by boban.s
- In java, I believe you can attempt to call a method even though the compiler can't find the method in the object's known class. Basically, you could do something like this -
Object o;
o.SomeMethod();
The java compiler doesn't look to see if SomeMethod exists in o. It simply compiles the code and tries to find the method on the object at run-time. If it's not found, something like a Method
-
- Dynamic access to statics objects
by Pechar
- 7 Replies
- Last post
by mberseth
- Hello,
I have three pictureboxes on my form (pictureBox1,pictureBox2,pictureBox3) and I want to randomly select one of them and show selected picture on it....
I have created this one, but it doesnĄ¯t work. But IĄ¯m not suprised, I Ą¯m totaly newbie at c#
Random rnd = new Random ();
int randomNumber2 = rnd.Next(3);
randomNumber2++;
string boxname = "picture
-
- 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
-
- problem working with ApplicationSettingsBase class
by dezhur
- 3 Replies
- Last post
by Peter Ritchie
- Hello!
I want my application to remember some settings and they must be stored localy (in case the database is down). After reading the MSDN looks like derive class from ApplicationSettingsBase is the right way to do it.
I have next code:
public class My Settings : ApplicationSettingsBase
{
[ UserScopedSetting ()]
public bool Value
{
set
{
-
- Printing ASCII text and variables from C#
by Tequilover
- 5 Replies
- Last post
by Peter Ritchie
- How do I print fixed text and calculated variable values nicely formatted from a C# program.
-
- Dynamic memory allocation in C#?
by Saswata Basak
- 9 Replies
- Last post
by Saswata Basak
- Hi guys,
Do you have any idea as to how do we dynamically allocate memory in C#
Please post any relevant code also.
Thanks in advance.
Saswata.