Share via


Ask a FAQ Question

Do you have a FAQ about:

  • The C# Language or compiler
  • The C# IDE
  • The Visual Studio debugger

Reply to this post, and your question will be added to our list to be answered. Of course, depending on the nature of your comment, and the volume we receive, we may not get to every question.

Note that if your question is not about C# specifically (if it is, for example, a Windows Forms question or a general question about the .NET Framework), it would be better to post that question to a newsgroup or web forum. Visit https://msdn.microsoft.com/vcsharp/community/ for a listing of related resources.

Thanks!

Comments

  • Anonymous
    March 06, 2004
    I just have a couple of productivity questions regarding intellisense.

    Is it possible when you type {, (, [, etc. to have the IDE automatically insert the corresponding }, ), ] etc.? Does this exist in VS.NET 2003? Am I just blind?

    Would it be possible to have intellisense insert the beginning of the text when list values are the same?

    Example:

    If you type

    System.AppD

    and intellisense displays

    System.AppDomain
    System.AppDomainSetup
    System.AppDomainUnloadedException

    could the IDE automatically expand it to

    System.AddDomain

    or possibly if you just hit tab to select AppDomain leave the intellisense selection up if there are others that match?

  • Anonymous
    March 06, 2004
    If I send my program to a friend, he can't start it, even though he has the .NET framwork 1.1 installed, what have I done wrong?

  • Anonymous
    March 06, 2004
    How can I do code injection?

    I think I can use the remoting API but I'd like to know if there is a way to inform the compiler to inject code based on an attribute.

    For example, we use a privilege based system. Every function needs a call to get the current user and ask whether or not it has the privilege X.

    [RequiresPrivilege(AppPrivileges.SomePrivilege)]
    public void function(){
    ...
    }


    I could then enforce that every public function also has a privilege attribute set to it.

    I think I can do this at runtime with AppDomains but it feels like it's a big performance hit.

    Will Whidbey solve my problem?

    Thanks

    PS I have a lot of questions regarding the IDE... let me know if they are appopriate here too.

  • Anonymous
    March 06, 2004
    Simple productivity question. Why doesn't C# intellisense expand enum values like VB.NET? I'm primarily a C# programmer, but I use VB.NET for some functions, and it's one thing I really miss.

  • Anonymous
    March 06, 2004
    A. When, if at all, will there be a CSharpCodeParser implementation?
    B. When, if at all, are you planning on creating a CodeDOM that is language specific, alongside the CLS one?

  • Anonymous
    March 06, 2004
    Why does try/catch require curly braces even when there is only a single statement?

    eg. The following is not permitted.

    try
    statement;
    catch
    statement;

  • Anonymous
    March 06, 2004
    About C# 2.0:
    why is there a 'new()' constraint for generics (requiring a no-arg constructor in the class), but not a constraint that requires presence of a particular argument signature for a constructor, e.g a constraint 'new(int, string)'. Having a no-arg constructor often means having partially initialized objects around, which in turn requires a check like 'is this object initialized?' in every method.

    And related, is there any hope of being able to define a constraint requiring the constrained class to have a static method with a particular name and signature? (you cannot use interfaces for static method constraints, of course).

  • Anonymous
    March 06, 2004
    Why doesn't the IDE (VS2003) allow me to reference an assembly with the extension *.exe? You can select an .exe in the 'add reference' dialog (.exe is in the open file dialog filter), but the next thing that happens is that it is refused. The worst part is that there is no reason to refuse it.

    For those of you who are wondering why someone would ever want to import references from an EXE: you may want this ability when developing 'plugin' DLLs.

  • Anonymous
    March 06, 2004
    Why doesn't the new Whidbey deployment features work with alternate build tools, such as NAnt?

  • Anonymous
    March 06, 2004
    I would really like to see Edit-N-Continue in C#. Yes, I can hear all the anti-ENC crowd starting to bubble up with displeasure at this horrible suggestion that will ruin development as we know it, but let me give you a real life situation that I have. I build large and complex applications. It literally takes several minutes to start the debugger and to get the application running. There is no great buzz-killer than to realize that the problem is because some property is being set to the wrong value or some method is being passed a wrong value or something else stupid. Why should I have to stop the debugger, change the value, restart the debugger, and then go back to the same location within the application? Before someone says, well just leave a web browser up and blah, blah, blah, what happens if the application is a Winforms application?

  • Anonymous
    March 06, 2004
    Why aren't there exquivalents for FILE and LINE?

  • Anonymous
    March 06, 2004
    If I have this...

    string s = "this is a test";

    why couldn't I do this in C#'s immediate window?

    ?s.IndexOf("this")

    I will get "error: 's.IndexOf' does not exist" message. It works in VB.NET.

    I have to wirte my own a generic method if I want to evaluate an expression that contains an object's function.



  • Anonymous
    March 07, 2004
    The comment has been removed

  • Anonymous
    March 07, 2004
    Why is the same keyword used for the using statement and the using declaration?

  • Anonymous
    March 07, 2004
    The CLR seems to support co-variant return types. Will co-variant return types be supported in the next version of C#?

  • Anonymous
    March 07, 2004
    Why doesn't C# support changing the return type of overriding methods to derived types, e.g.

    class c1
    {
    public virtual c1 Negate() {..;}
    }
    class c2: c1
    {
    public override c2 Negate() {..;}
    }
    class c3: c2
    {
    public override c3 Negate() {..;}
    }

    Up to now I have to use workarounds like the following to support such behaviour (get's even more overhead in my case):

    class c1
    {
    public c1 Negate() {return InnerNegate();}
    protected c1 InnerNegate() {..;}
    }
    class c2: c1
    {
    public new c2 Negate() {..;}
    protected override c1 InnerNegate() {return Negate();)
    }
    class c3: c2
    {
    public new c3 Negate() {..;}
    protected override c1 InnerNegate() {return Negate();)
    }

  • Anonymous
    March 07, 2004

    If I have this...

    string s = "this is a test";

    why couldn't I do this in C#'s immediate window?

    ?s.IndexOf("this")

    I will get "error: 's.IndexOf' does not exist" message. It works in VB.NET.

    I have to wirte my own a generic method if I want to evaluate an expression that contains an object's function.


    You get the annoying same behavior with .ToString() or .ToUpper() in the immediate window.

  • Anonymous
    March 07, 2004
    Why does not VS support ^shtml^ files - does not color the code there like in html files. In order to get it work I have to patch the registry.

  • Anonymous
    March 07, 2004
    There should be such a function :

    String.isnullorempty() =

    (String.isnull() || String.isempty())

    I do this a lot.

  • Anonymous
    March 07, 2004
    Why does c# requires 2bytes for storing array of booleans. However it takes 1 byte as a single site.

  • Anonymous
    March 07, 2004
    I actually posted about this on my blog at http://schweitn.blogspot.com/2004_02_01_schweitn_archive.html#107782132911035587

    The basic question is why doesn't C# support something similar to const reference parameters in C++? The problem lies in that there is no way for me as the caller of a method to know whether my argument to that method which is a reference type won't be changed. I think this is a huge shortcoming in C#/.NET ... and really kills programming safety, especially if someone is using a third party assembly where I can't look at the code and see what's happening. I want the compiler/CLR watching my back.

  • Anonymous
    March 08, 2004
    Does C# have support for FTP connections like C++ does in the CFtpConnection and CInternetSession classes?

  • Anonymous
    March 08, 2004

    Why does the IDE start to lock files after 15/20 projects in the one solution? How do we avoid this, and how do we fix this?

    Why does the IDE basically start to break down after 30 projects? Locking files, losing intellisense, problems attaching to IIS (6) while debugging an asp.net app (need to reboot in order to fix this).

    A fix would be to build some of the projects and make static references to their dll's. In many cases this is not realistic because to manage this would take up most of a developers day.

    ps. I was recently talking with Habib Heydarian [habibh@microsoft.com] but he simply stopped returning emails and left my issues unanswered.

  • Anonymous
    March 08, 2004
    Why doesn't C# implements the "throws" clause as Java ?
    How can I be sure that I capture all the possible exceptions throw by a class,or just when I have to capture one ??

    Thanks.

  • Anonymous
    March 08, 2004
    Q1. Why doesn't C# support conditional tests as part of SEH, such as try..filter..catch in CIL or Try..Catch..When in VB?

    Q2. Why doesn't C# provide a more flexible means of specifying interface implementation? E.g.

    protected virtual void MyMethodCore() implements IMyInterface.MyMethodCore {...}

    instead of

    void IMyInterface.MyMethod() { MyMethodCore(); }

    protected virtual void MyMethodCore() {...}

  • Anonymous
    March 08, 2004
    The comment has been removed

  • Anonymous
    March 09, 2004
    Q: Why doesn't C# have a "handles" keyword?

    In VB.Net, it's easy to hook up events using the "Handles" keyword. E.g.:

    Private Sub TextBox_TextChanged(sender As Object, e As EventArgs) Handles currencyTextBox.TextChanged

    In C#, the same is rather cumbersome -- using += and -= to manually subscribe/unsubscribe to the handlers.

    I understand that the VB Handles keyword is really just syntactic sugar, but IMO it makes for more maintainable and readable code. += and -= seem like overkill for handling simple events.

    Did the C# team consider adding a "handles" type keyword, and, if so, what was the justification for leaving it out? Are there plans to add a "handles" keyword in Whidbey or later versions of C#?

  • Anonymous
    March 09, 2004
    Interesting new blog at blogs.msdn.com - "C# Frequently Asked Questions", where the C# team posts answers to common C# questions. Subscribed. Why doesn't C# support default parameters? Why doesn't C# support multiple inheritance? Why doesn't C# support #define macros? Ask your question here....

  • Anonymous
    March 10, 2004
    The comment has been removed

  • Anonymous
    March 10, 2004
    Is there any way to see where the handles in use by a C# app are being used?

    I have an app that grows to several thousand handles in use (as viewed in taskmgr) over the course of a day, but can't find the cause.

  • Anonymous
    March 10, 2004
    Add to the previous question.. Assume I can't (for a long list of silly political reasons I have no control over) "remotely debug" said application to get the same information..

  • Anonymous
    March 11, 2004
    Why doesnt c# have a #INCLUDE directive ?

  • Anonymous
    March 12, 2004
    (If my memory serves me well)
    In c++ is was bad to do this:
    for ( int i = 0 ; i < 10000 ; i++ )
    {
    int a = i;
    }
    as many, many ints would be created and fill up the stack space.

    Is it okay to do that in c# or should I be coding it like:
    int a;
    for ( int i = 0 ; i < 10000 ; i++ )
    {
    a = i;
    }

  • Anonymous
    March 15, 2004
    What future classes are being added to System.Collections? Can they be rewritten using generics and provide STL like usage?

  • Anonymous
    March 16, 2004
    What occurs internally when an ArrayList reaches its default capacity - 16; I noticed that the capacity gets doubled but what about the objects in the arraylist?

    What occurs internally when you .Insert an item into the arraylist?

    What is a good example of when to use the capacity value in the constructor ( new ArrayList(400) ) as opposed to using the default constructor (new ArrayList())

    Thanking you,
    -ron

  • Anonymous
    March 16, 2004
    I have read your "Calling Code Dynamically" which is very interesting, but I wish you would go into more details. What are the reasons for the performance differences?
    Why are interface method calls slower than direct calls? Why are delegates even worse now, but on par in Whidbey?

    Cheers,
    Dumky

  • Anonymous
    March 16, 2004
    Can you give examples of uses of WeakReference besides caches?
    Is there any guarantee that the pointer doesn't get collected between the call to IsAlive and getting the Target?

  • Anonymous
    March 16, 2004
    The comment has been removed

  • Anonymous
    March 16, 2004
    If class A defines a static member X and class B, which derives from class A, defines a static member with the same signature,
    why am I asked to place the 'new' keyword on the definition in class B? Static members are supposed to be bound to the type, not to the instance. If I don't define a static member on B, why am I still able to perform B.X even though X was defined on A?

  • Anonymous
    March 16, 2004
    Why can I give a structure a default constuctor? It would be great to be able to control what values the stuctures members take rather than having them assigned there default values.

  • Anonymous
    March 18, 2004
    The comment has been removed

  • Anonymous
    March 21, 2004
    Is C# getting Edit-and-Continue?

  • Anonymous
    March 24, 2004
    A question copied from
    http://www.techinterviews.com/index.php?p=55

    "How do you specify constructors in an interface?" Answer is "You cannot. C# does not allow constructor signatures to be specified in interface." I don’t know the reason why.

  • Anonymous
    March 24, 2004
    Hi,
    I am c# developer.I want to know that in c# "plug-Compose" is
    possible? "Plug-Compose" is different from "plug-play".

    Any idea about "Module Adaptation" in c#.IF anyone can suggest me
    links or examples.That would be gr8.

    I would really appricate that.

    Thanks a lot!!
    Raj

  • Anonymous
    March 24, 2004
    When using a the using statement as below, my form is not releasing the memory aquired when the form is shown.

    The form only has some buttons and labels.

    using (Wizard frmWizard = new Wizard())
    {
    frmWizard.Tag = log;
    frmWizard.Show();
    do
    {
    Application.DoEvents();
    } while (frmWizard.Visible);
    frmWizard.Tag = null;
    }

    thanks,

    Scott

  • Anonymous
    March 25, 2004
    Does assigning a variable to null at the end of a routine make any sense? I have inherited some code where this is done alot, and my opinion is that nothing is gained by assigning a variable to null right before it goes out of scope. Could we have some direction on this please?

  • Anonymous
    March 25, 2004
    Need to print a form out to a printer.
    Used "Form".PrintForm
    Scaling way out.
    Can I scale? or use a "fit to page" so it automatically scales the form to an A4 sheet?

  • Anonymous
    March 25, 2004
    The comment has been removed

  • Anonymous
    March 25, 2004
    What is the performance difference betwen using Static members and Instance members.

    E.g. I have a class Admin and a member name GetUser()

    What is the performance difference between

    Admin.GetUser();

    and

    Admin admin = new Admin();

    admin.GetUser();

  • Anonymous
    March 28, 2004
    In general web application(ASP.NET) scenario which of the variable will have the application scope for e.g if I read a properties file in a datastructure and keep it as a static variable. Is it the same as storing that variable in an application object.That means it is avaible till I stop IIS.

  • Anonymous
    March 28, 2004
    The comment has been removed

  • Anonymous
    March 29, 2004
    I have used Microsoft.Samples.WinForms.Extras to present a dialog for my User to browse to and select a folder.

    This works fine, first time the User needs to browse the default path is set to "My Computer".

    However, the User may need to browse to the same location a number of times and what I would like the dialog to do next time around therefore is to start at the folder previously browsed to. How can I "seed" the dialog to do this?

  • Anonymous
    March 29, 2004
    I seem to remember somewhere someone made the comment that you should be careful when deciding to use static functions/fields in classes. I know that a lot of developers use static fields/methods as globally available fields/methods. Is this a good practice? What should you watch out for when using static fields/methods? Are static fields sometimes shared across AppDomains? Are there any threading issues with static fields/methods?

  • Anonymous
    March 30, 2004
    How do I access a serial port using C#?

  • Anonymous
    March 30, 2004
    What advantages (such as speed), if any, are there to using readonly on private fields that only get assigned in the constructor?

  • Anonymous
    March 30, 2004
    In VB6 MTS was used to handle transactions. How are transactions carried out by C#?

  • Anonymous
    March 30, 2004
    How exactly does Visual Studio .NET integrate with NANT for doing builds? Any information would be appreciated.

  • Anonymous
    March 30, 2004
    How exactly does Visual Studio .NET integrate with NANT for doing builds? Any information would be appreciated.

  • Anonymous
    April 01, 2004
    Why C# does only support nameless indexers?
    What about virtual constructors and class references? Is there any danger related to these features? I'm a Delphi programmer moving to C#, and I find class references and virtual constructors very useful to implement the factory pattern.

  • Anonymous
    April 01, 2004
    The comment has been removed

  • Anonymous
    April 01, 2004
    In my organization, there's been quite a bit of back and forth regarding what is the "best" way to do string concatenation. Obviously, the "best" case will vary from situation to situation, but it's hard to determine a good guideline for when to switch methods. Can you please discuss the differences between, e.g.:

    string a = "A";
    string b = "B";

    string c = a + b;

    string c = string.concat(a,b);

    StringBuilder sb = new StringBuilder();
    sb.Append(a);
    sb.Append(b);
    string c = sb.ToString();

    ...as well as any additional concatenation methods you'd like to point out? Thanks!

  • Anonymous
    April 02, 2004
    i need your help for my project in the college it is about sending multimedia messegethrow mobile device by accessing to the database by dialing a special number.for more describtion send to me your agreement.thanks

  • Anonymous
    April 02, 2004
    i need your help for my project in the college it is about sending multimedia messegethrow mobile device by accessing to the database by dialing a special number.for more describtion send to me your agreement.thanks
    my e-mail:tomy331107@yahoo.com

  • Anonymous
    April 02, 2004
    It would be nice if "in" keyword in C#, can behave also like TSQL's "in"

    For example:

    int i=1;
    int[] goodValues=this.goodValues; //May be from DB
    int[] badValues=this.badValues;
    if (i in goodValues) && (!i in badValues)
    {
    //i is good, lets do something with it
    }

  • Anonymous
    April 02, 2004
    Why C# is consider Faster then any other .Net Language?

  • Anonymous
    April 05, 2004
    give the namespaces of programming basics

  • Anonymous
    April 05, 2004
    How can i check whether the property has keywords new, abstract, virtual, static, new in its declaration from CodeProperty?

    There's no problem to get access modifiers, but what about the keywords?

  • Anonymous
    April 05, 2004
    How do you get text values (from textbox..) into numeric format(int or float) for computations. I have an old prg. (vcpp6) which used the atoi function from C Legacy. What do we use to replace this class of string conversion functions? I have looked into several textbooks and no examples of this were sited.

  • Anonymous
    April 06, 2004
    How do you read in a jpeg as a x res * yres matrix of colors values in C# using the compact framework? Im trying to make a web service of something that used to run in matlab.

  • Anonymous
    April 06, 2004
    public static void Main()
    {
    int i = 3;
    int j = 3;
    object o = i;
    object o2 = j;

    // Why is the output true? I thought boxing yielded different "boxes"
    // and since System.Object.Equals is identity based the result would be false!
    Console.WriteLine(o.Equals(o2));
    }

  • Anonymous
    April 09, 2004
    I would really, really love this feature (and miss it from C++).

  • Anonymous
    April 09, 2004
    You have added a Nullable<T> struct to .Net version 2.0, but I would also like to see a Wrapper<T> class, that works just like the Nullabel<T> struct. If it is a class, it would give us the possibility to extend it. We could with a struct win performance because it will not be added to the heap, but is there another reason why you don't have created the Nullable<T> as a class?

  • Anonymous
    April 12, 2004
    Structs and boxing make everything more complicated. Structs are objects but in a way they are not. The way Java solves the boxing is less generic but has many advantages. E.g.: you can still add Integer objects.

  • Anonymous
    April 14, 2004
    I am tring to generate a lot of random colors so I use the following function:

    public void RandomColor(ref Color c)
    {
    Random R =new Random();
    c=Color.FromArgb(R.Next(256),R.Next(256),R.Next(256));
    return ;
    }

    when i run this from the I get always the same color. But when i use a breakpoint on the code, it works ok.

    Any ideias ?

  • Anonymous
    April 14, 2004
    This question is regarding the usage of Finalize() and Dispose(). How do u choose which one to use?? Dispose() clears up any managed and unmanaged resources anyway, so when do u have to actually use Finalize(). Finalize() has a extra overhead too as it has to be handled in a different way by the CLR. So how can u justify the usage of Finalize() in a situation?

  • Anonymous
    April 14, 2004
    The comment has been removed

  • Anonymous
    April 15, 2004
    Why was DateTime created as a value type rather than a reference type? Making it a value type foreces everyone to find an alternative. Try Googling for "nullable DateTime C#".

    Anyone who has ever worked with dates knows that they are frequently unassigned, so I assume that there's a well thought-out reason. The only thing that I've been able to come up with is the efficient memory allocation when used in arrays.

  • Anonymous
    April 15, 2004
    Why does C# doesn't allow to call an instance method inside a class declaration instead of method declaration?

  • Anonymous
    April 17, 2004
    When are you going to release C# 2.0 ?

  • Anonymous
    April 18, 2004
    can I write and deploy applications using visual C# standard edition professionaly? with out buying Visual Studio which is costly compared to C# alone

  • Anonymous
    April 19, 2004
    The comment has been removed

  • Anonymous
    April 19, 2004
    Why doesn't c# have late-binding of methods ?

    i.e. consider the code:
    void process(string s){
    Console.WriteLine("string called");
    }
    ///
    ///
    void process(object o){
    Console.WriteLine("object called");
    }
    //
    //
    void testBinding(){
    object obj = "string";
    process(obj);
    // result is "object called";
    }

    in java the result is "string called", why doesn't c# recognise the RTT of the object and adjust to call the appropriate method.

  • Anonymous
    April 19, 2004
    Why we can not define fields in an interface???

  • Anonymous
    April 19, 2004
    Sometimes, when I need to assign optional fields to the database, these fields will receive null... Most of them are datetime types... So I pass a DateTime as a parameter, but since it is a Value Type, I can't assign null to the variable...

    So I declare it as an object...
    If the value will be passed, I instatiate it as an DateTime, and pass as a SqlParameter.. If don't, I just assign Convert.DbNull to the variable...

    The first question here is, how good is that practice? The another is structurally, how the C# addresses that? Objects are Reference Types right? So, when I assign a Value Type, then the boxing comes in hand... But what the object variable really holds? The object becomes a value-type? How he's stored?

    Thanks!

  • Anonymous
    April 19, 2004
    Is there any equivalent to Vb.Net MyBase.New, to call the base class constructors?

    Suppose a simple sample, I want to create an custom Exception, derived from the Exception Class... And I have my messages enumerated...

    Acordling to the ErrorMessage I received, I load an Error string into Exception Message, and load some other custom fields a created for my Class...

    In VB.Net I would do the following...

    ----------------------------

    Public Enum ErrorMessages
    Message1
    Message2
    End Enum

    Public Class MyException
    Inherits Exception

    Public Sub New(message As ErrorMessages)
    Select Case (message)
    Case ErrorMessages.Message1
    MyBase.New("This is the Error #1")
    ' Do some specific Login here
    Case ErrorMessages.Message2
    MyBase.New("This is the error #2")
    ' Do some specific Logic here
    End Case
    End Sub
    End Class

    ----------------------------

    Don't know how could I do this in C#... Because the only way I know to call the base constructor is overriding it, wich means that it'll have the same set of parameters of the base constructor...
    Is there a way to reach that in C#?

    Thanks..
    Rafa®

  • Anonymous
    April 21, 2004
    The comment has been removed

  • Anonymous
    April 21, 2004
    A hashtable created the "normal" way, with the default constructor, will call the GetHashCode() and Equals() methods of the keys inserted into it.

    However, a hashtable constructed with IHashCodeProvider and IComparer arguments puts more of a burden on the programmer. Specifically, the contract for IComparer.Compare(a,b) requires an ordering test rather than an equality test: it has to return a result indicating whether a is less than, equal to, or greater than b; not simply whether a equals b. There are many cases where a class can have a notion of equality but not of ordering.

    Why this assymetry? Shouldn't the second parameter be something like an "IEqualProvider" rather than IComparer? The implementation of Hashtable obviously doesn't need an ordering test.

  • Anonymous
    April 21, 2004
    The comment has been removed

  • Anonymous
    April 21, 2004
    I would like to know how to fix my color pixels on monitor and please don't tell me to follow the help because I have been through them steps so many times that I know them by heart what I really want to know is there a fix it program or does any one have any ideal on how to fix this problem because I have been on this for a month.The slider will not work to where I can change the pixels in my display area so please if any one can help I would be very greatful because I don't have the money to pay to have it fix the computer was gave to me so I am trying to fix it my self

    Thank you
    Sandy Pegram

  • Anonymous
    April 21, 2004
    I would like to know how to fix my color pixels on monitor and please don't tell me to follow the help because I have been through them steps so many times that I know them by heart what I really want to know is there a fix it program or does any one have any ideal on how to fix this problem because I have been on this for a month.The slider will not work to where I can change the pixels in my display area so please if any one can help I would be very greatful because I don't have the money to pay to have it fix the computer was gave to me so I am trying to fix it my self

    Thank you
    Sandy Pegram

  • Anonymous
    April 21, 2004
    I would like to know how to fix my color pixels on monitor and please don't tell me to follow the help because I have been through them steps so many times that I know them by heart what I really want to know is there a fix it program or does any one have any ideal on how to fix this problem because I have been on this for a month.The slider will not work to where I can change the pixels in my display area so please if any one can help I would be very greatful because I don't have the money to pay to have it fix the computer was gave to me so I am trying to fix it my self

    Thank you
    Sandy Pegram

  • Anonymous
    April 21, 2004
    I'm curious to know why the C# team left out the IsNumeric function from C#? This is a very commonly used function, and I would like to know the reason for omitting this from the C# language? It is catered for in VB.NET, but why not C#? Is there a significant reason?

  • Anonymous
    April 22, 2004
    Hi,

    I would like to know the maximum limit of the number of elements I can add into a Hashtable before performance begins to degrade ? Specifically, I need to add around 150,000 elements into a Hashtable object. Would Hashtable still be able to handle that ?

  • Anonymous
    April 22, 2004
    I try to upgrade my VB6 program part by part. Could you send a sample to me on "how to create an ActiveX Control with C#?" Or just tell me how to do it.

    Thank you,

    Waiman

  • Anonymous
    April 23, 2004
    why does an object finalize (or a destructor) method need to call it's base class finalizer?

    thanks!

  • Anonymous
    April 25, 2004
    MSPress produce a software package "Visual C#.Net 2003 Standard Software" and separately a book and software package "Visual C#.Net De Luxe Learning Edition 2003" containing waht appears to be the above software plus the Visual C#,Net Step by Step book.
    What do the two different software packages contain? How do they differ? The book package is priced lower than the software alone which makes more attractive.

    Derek

  • Anonymous
    April 26, 2004
    Does Class WebClient Support Cookies and how to do?
    Thanks

  • Anonymous
    April 26, 2004
    The comment has been removed

  • Anonymous
    April 27, 2004
    I find MS pages to be long on information and choices and short on organization.

    Can you tell me the relationship between Visual Studio and Visual C#? I want to develop using C#. I went to MSDN and downloaded the runtime .net and the .net sdk 1.1. I want to use the IDE and looked on MSDN pages.

    I hear Visual Studio and Visual C# but do not see relationship. I am guessing the Visual C# is a subset of Visual Studio, but I have no idea.

    What do I need to develop .net application with .net IDE?

    Thanks,
    John

  • Anonymous
    April 27, 2004
    The comment has been removed

  • Anonymous
    April 27, 2004
    is there any limit for classes in a dll in .Net environment. If there is a limit then how many classes can be there in a .dll

  • Anonymous
    April 27, 2004
    How to customize PrintPreviewDialog in C# such that addition of a button, deliting existing control and changing functionality of existing control should be possible. Sample code will help me a lot
    regards

  • Anonymous
    April 29, 2004
    The comment has been removed

  • Anonymous
    April 30, 2004
    Is there any difference between the following in terms of performance or generated IL?

    class A
    {
    int i = 4;

    public A()
    {
    }
    }

    and

    class B
    {
    int i;

    public B()
    {
    i = 4;
    }
    }

  • Anonymous
    May 02, 2004
    I find the whole c# finalizer issue a bit weired:

    The documentation I've read state clearly that the Finalize method of every object is called before it's de allocated, and that this invocation slows down the memory de allocation.

    So, it seems like a good idea to implement IDisposable on every object, and within the Dispose method to call GC.SupressFinalize and that way we make the GC sweep faster.

    But... microsoft doesn't recommend that, and it does seem silly to do such a thing explicitly.

    Which leads to the final question - does the CLR calls the Finalize methods on objects even if Object.Finalize was not overriden ???

    Thanks, Hagay.

  • Anonymous
    May 03, 2004
    How to implement LateBinding in c#?

  • Anonymous
    May 04, 2004
    The comment has been removed

  • Anonymous
    May 06, 2004

    I want to append a stringbuilder object to an another string builder object.
    Is that a way to do it other than
    calling the stringbuilder.ToString() method.

  • Anonymous
    May 07, 2004
    How are type comparsions made in c#.

  • Anonymous
    May 07, 2004
    <pre>

    using System;

    class Base
    {

    public virtual void Print()
    {
    Console.WriteLine( "Executing the base." );
    }

    }

    class Derived : Base
    {

    private new void Print()
    {
    Console.WriteLine( "Executing the derived." );
    base.Print();
    }

    public void Print2()
    {
    Print();
    }

    }

    class MainApp
    {

    static void Main()
    {

    Derived obj = new Derived();
    obj.Print();

    Console.WriteLine( "" );

    obj.Print2();

    }

    }

    </pre>

    now Derived have two different versions of Print, one can be called externally, one internally. should the compiler really allow this?

  • Anonymous
    May 07, 2004
    How do you debug WinForms control designers? I seem to have gotten it to work by loading the control library in an instance of the IDE, setting the library's debug mode to "Program" and setting the Start Application to devenv.exe and then using that second instance of the IDE to start a test harness for the control library.

    Is there a better way to do it?

  • Anonymous
    May 10, 2004
    Hi,

    I've encountered a strange phenomena which appears to me as a bug:

    I have an engine that uses a System.Threading.Timer to invoke a delegate every X minutes.

    The code looks something like this:
    TimerCallback callBack = new TimerCallback(Run); // run is obviously a method
    analysisTimer = new Timer(callBack, null, 0, delay);
    Console.ReadLine();

    Everything works just fine when the code is build in Debug mode, but when the code is build in Release mode the delegate is invoked once only.

    After creating debug symbols for the Release mode it looks like the timer class is optimized away...

    The workaround solution I used was declaring the timer as static.

    But obviously it's not very nice...

    Any clue as to is this a bug, or what's wrong with the code ?

    Thanks, Hagay.

  • Anonymous
    May 12, 2004
    The comment has been removed

  • Anonymous
    May 12, 2004
    The comment has been removed

  • Anonymous
    May 12, 2004
    The comment has been removed

  • Anonymous
    May 14, 2004
    Why doesn't C# allow marking local variables with "const" (like C++,) or "readonly"?

  • Anonymous
    May 14, 2004
    DOes someone use C# make a driver programe

  • Anonymous
    May 17, 2004
    The comment has been removed

  • Anonymous
    May 18, 2004
    For example...

    interface IRecord
    {
    void Save();
    void Delete();
    static IRecord Read( int key );
    }

    The compiler complains about this...

    The modifier 'static' is not valid for this item

  • Anonymous
    May 18, 2004
    The comment has been removed

  • Anonymous
    May 18, 2004
    from http://weblogs.asp.net/asmith/archive/2004/05/19/134781.aspx

    "<i>So if "non virtual by default" is the right thing for c#... Then why isn’t “sealed by default” the right thing too?

    It seems to me that if we are supposed to be testing extensibility points and purposefully allowing derivation and overriding for specific scenarios, then it seems to me that classes should be sealed by default, until we know that we acknowledge those scenarios.

    Now, I’m not taking a stance here on the virt/nonvirt issue here. I really don’t care. But it just seems to me that “sealed by default” is the logical extension to the c# team’s points for their design, and I’m genuinely curious as to why they chose a different model at the class derivation level." </i>

  • Anonymous
    May 19, 2004
    C# is a great language and I'm happy to be able to use it. However it has a problem which it shares with many other similar languages (Java, C++, etc): the lack of elegant support for assigning multiple values to multiple variables at once. Especially is this evident when trying to return multiple values from methods, or swapping values between variables.

    Simpler languges like Lua (www.lua.org) solves this in a very elegant way without the need for "out"-variables and similar. I think the Lua syntax is possible because the language is stack based, which to my knowledge IL is too.

    C#:
    a = BiteMe(x, y, out b);

    Lua:
    a, b = BiteMe(x, y);

    C#:
    temp = s
    s = t
    t = temp

    Lua:
    s, t = t, s;

    Can this be incorporated in the C# language?

  • Anonymous
    May 20, 2004
    I'm currently a VB.net developer, and I'd like to begin my C# education. If you have any suggestions regarding literature that supports the self-taught. I'd appreciate some direction(s).

    Thanks

    Knarf

  • Anonymous
    May 20, 2004
    A number of times I've run into the situation where I wanted to provide two methods with identical parameters, but which return different types. A good example is a method that can optionally return a data reader or a data set.

    I've read that the runtime itself actually supports overloads based on different return types, but C# doesn't implement this.

    Thanks
    charlie

  • Anonymous
    May 22, 2004
    How to make C# . net rs232 application run on pocket pc.

  • Anonymous
    May 22, 2004
    I'm confused about how to utilize Application Block in my C# based applications. I've not found any through sample which shows how to use all the tiers resides in the Application Block. Please, let me know where can I find a C# sample showing how to use Application Block step by step?

  • Anonymous
    May 26, 2004
    Why isn't it anywhere near as simple to send to the Recycle bin as it is to do a plain File.Delete?

  • Anonymous
    May 31, 2004
    Why there is no 'throws' keyword in C# just like java?
    In java a method can specify what exception it can throw using the 'throws' statment. This way the caller has to catch those exception or it can rethrow the exceptions to its caller. Why this functionality is not there in C#?

  • Anonymous
    May 31, 2004
    Ashish, check out this entry;

    http://blogs.msdn.com/csharpfaq/archive/2004/03/12/88421.aspx

  • Anonymous
    June 01, 2004
    I want to make a program to auto_exit windows2000 by c#.I can restart the machine,but i can not shutdown(require to press the power button).why?

  • Anonymous
    June 01, 2004
    How can I connect C# to Database (mysql)? How can I work with the tables of the databank?

  • Anonymous
    June 01, 2004
    How can I reuse my exiting C++ classes from c#?
    I don´t want to pack them into a dll, I only want reuse .cpp files.
    I have found some articles about writing managed wrappers (using Managed Extensions for C++) for unmanaged C++ code, but they are not very clear, and don´t give real world examples using VS.NET.

  • Anonymous
    June 02, 2004
    Will the C# language ever have support for C-style unions? Also, should structures really have to be instantiated with a "new" if they only contain data elements? They should be auto instantiated and be reference counted/auto destruct

  • Anonymous
    June 04, 2004
    A friend and I were discussing method overloads and neither could explain why the return type isn't taken into consideration as a unique part of the signature other than it's just not.

    For our curiosity, can you explain why that design decision was made?

  • Anonymous
    June 08, 2004
    Hello:
    In VB6, I have an app that uses createobject(). In this particular app, it comes in handy because one of our dlls provides enhanced functionality that not all customers want. As such we have two installs that we used. One only installs the standard edition of our app and the other installs the professional edition. If the user using the standard edition tries to access the extended feature (using its menu option), we display a messagebox telling them that this functionality currently exists in the professional edition of the app. Essentially we have an error handler that returns an error when we try to create an instance of the object. How can we accomplish this in C# without createobject?

  • Anonymous
    June 10, 2004
    How would I call a button_Click() Event Handler from within my application (programatically). I want to treat it just like any other methed call, except I do not know how to pass the event handler the 2 required arguments.

  • Anonymous
    June 11, 2004
    What is the Differance between SQLDataCommand and SqlDataAdapter

  • Anonymous
    June 16, 2004
    By accident, I've collided with some behaviour of C# compiler, which I think is not very correct, but I'm looking forward to get rationale on this.

    I have 3 projects: Project1, Project2, and Project2.

    Project2 refers Project1, and
    Project3 refers Project2.

    These are the sources:

    Project1:
    ---------
    namespace Project1
    {
    public class A { }
    }

    Project2:
    ---------
    namespace Project2
    {
    using Project1;

    public class B { }

    public class C
    {
    public static void Method(B b) {}
    public static void Method(A a) {}
    }
    }

    Project3:
    ---------

    namespace Project3
    {
    using Project2;

    public class D
    {
    public D()
    {
    B b = new B();

    C.Method(b); // Error: The type 'Project1.A' is defined in an assembly that is not referenced. You must add a reference to assembly 'Project1'.
    }
    }
    }

    P.S. If you rename Method(B) to Method1(B) all works.

  • Anonymous
    June 21, 2004
    how do i save a report i created from a form to an excel aplication?

  • Anonymous
    June 21, 2004
    how do i use msgbox in asp.net using c#

  • Anonymous
    June 23, 2004
    IDE Question

    Using which method was the .NET Control "Property Browser" (the property grid) embedded with the rest of Visual Studio .NET IDE?

    Methods:
    1) COM interop (the PropertyGrid was exposed as COM control)
    2) MC++ (IJW)
    3) other?

  • Anonymous
    June 30, 2004
    What is the difference between a static method and an instance method in terms of the memory allocation ?

    Where Can i find some documentation as to what happens when a new is called on any object. As to how are the variables (static vs non-static) and method (static vs non-static) allocated in the heap ?

  • Anonymous
    June 30, 2004
    If I have a class hierarchy C1 -> C2 -> C3 and in C3 I override a method from C2 which in turn has overriden this method from C1, is there a way to call C1's version of the method? This would be something like base.base.MethodName() or C1.MethodName().

  • Anonymous
    June 30, 2004
    I currently have had an application NewProject written in Visual BASIC 6.0. I would like to create another utility program NewUtility and this time I would like to use C#. I would like to call this NewUtility application by selecting a menu item in NewProject application. Can I do this?

    Basically, I would like to know if an existing VB application can call or activate a C# application. What are the requirements do I need to have in term of setting up the environment such as MS .NET framework, etc...

    Thanks,
    Joe Williams

  • Anonymous
    July 05, 2004
    Hi and Help
    I install CsGL in the way that you describe in (installing CsGL)
    but in c# enviroment when i type
    (using CsGL.) OpenGL disappear ??

  • Anonymous
    July 06, 2004
    I'd love an answer for this:
    http://weblogs.asp.net/okloeten/archive/2004/07/06/174196.aspx

    Thanks in advance. :)

  • Anonymous
    July 07, 2004
    how to edit the memory stream in vb.net

  • Anonymous
    July 09, 2004
    How we can implement "Multiple Inheritance" in C#?

  • Anonymous
    July 10, 2004
    Hi,

    I'd like to understand what's the difference between locking an instance of a collection (say, Hashtable) and locking the Hashtable.SyncRoot.

    What's the difference, what is the SyncRoot used for, etc.

    Thanks, Hagay.

  • Anonymous
    July 12, 2004
    Hi,
    I have a scenario where I am writing a property(using get and set) have to return a member of an object stored in an array of objects! The class user has to pass an index based on which a objects member is returned from the array.

    How will the property be declared in C#?

  • Anonymous
    July 13, 2004
    How can we do similar to

    CSting strtmp
    strtmp.Format("%8.2f" , floatvalue)

    and

    strtmp = "322-343-3333"
    strTmp.Remove('-')
    this would return 3223433333
    any direct function like this

  • Anonymous
    July 16, 2004
    How can I perform a formatted input operation (extraction). In C++, we have the >> operator that does this.

    Thanks.

  • Anonymous
    July 22, 2004
    I want to be able to use C# to develop tools that use API calls from propriatary sotware we use. DllImportAttribute seems to be the method used to declare the function. I've got the c header files for the functions and I beleive the following code is correct. But I get a NullReferenceException whenever I call the unmanaged function. Is there anyway I can determine what is causing the exception?

    using System;
    using System.Runtime.InteropServices;

    namespace PiApi {

    public class clsPiApi {

    [DllImportAttribute("piapi32.dll", EntryPoint="pipt_findpoint", SetLastError=true,
    CharSet=CharSet.Unicode, ExactSpelling=true,
    CallingConvention=CallingConvention.StdCall )]
    public static extern int findpoint([MarshalAsAttribute(UnmanagedType.LPStr)] string TagName ,
    [MarshalAsAttribute(UnmanagedType.I4)] int pt);

    public int getPoint(string TagName) {
    int ptno = new int();
    int retVal = new int();

    try {
    retVal = findpoint(TagName, ptno);
    } catch(System.NullReferenceException e) {
    System.Console.Write("Error " + e.Message + "nn");
    }

    if(retVal == 0){
    return ptno;
    } else {
    return 0;
    }
    }

    }
    }

  • Anonymous
    July 26, 2004
    ???Web????image?????listbox??????????.

  • Anonymous
    July 27, 2004
    http://channel9.msdn.com/ShowPost.aspx?PostID=14932#14932
    C# string vs. StringBuilder:
    How many concatenations would it take for StringBuilder to be more useful than a plain old string?

  • Anonymous
    July 28, 2004
    I am currently on a project where I have to generate a huge number of XML packets. I am currently using the XmlValidatingReader to validate the xml in text fragments. The problem is speed -- let me explain. I am validating up to 2 million fragments in a loop at 1 time (yes). The fragments are never much over 2K in size, but since the reader doesn't allow (at least as far as I can tell) a way to clear the current fragment and load another, I have to create a new reader each pass thru the loop. This can't be the optimal way to do it. Anyone have any ideas on validating huge amounts of xml in a loop that won't take me several days to finish? Oh, to make matters worse the fragments are all different types (12 total types of xml packets). I was really hoping to do something like this -- but it don't work

    XmlValidatingReader vr = new XmlValidatingReader(strXMLFragment, XmlNodeType.Document, context);
    while (HIDEOUSLY_LONG_LOOP)
    {
    while (vr.Read()) {}
    vr.Close();
    strNextXMLFragment = GetNextXMLFragment();
    vr.Open(strNextXMLFragment);
    }

  • Anonymous
    July 28, 2004
    how can i do advertisement of internet from speed.net and brand name is speed.net and other is cabble connection?

  • Anonymous
    July 28, 2004
    How can I dynamically load .NET Class Librarry DLL without making it statically definition in My project

  • Anonymous
    July 30, 2004
    public static bool IsIn(object subject, params Type[] targetTypes)
    {
    foreach (Type target in targetTypes)
    {
    if (subject is target)
    return true;
    }
    return false;
    }

  • Anonymous
    August 02, 2004
    ok, i have two problems:

    first: i'm trying to use an ObjectList for MovilePage at C# but when i'm tryin to catch the name of just a single field (Example: the item 1) i can't do it

    second: also i'm trying to use a List but when i do the Bind(), all that appears in the browser is "System.Data.DataRowView" for each content

  • Anonymous
    August 02, 2004
    I am trying to develope a small RTF writer to generate project report at runtime, with a limited RTF writing capability using C#. As, RTF is one page document only, untill we intentionally put page breaks in it and Project report consists of number of pages. Thus, on what criteria it should be decided to insert page break? How to keep track of page's empty area before inserting anything?
    OR
    The next issue to overcome is to determine how to page-break text that is too long for one page.
    Is there some way to identify exactly how many characters I can print before I run out of room in the current rectangle that defines the output, and do to a new page.
    RTF specification 1.6 to 1.8 doesn't give any example regarding this issue.
    I have tried on almost all question forums of C# but didn't get any hint.
    Please guide.

  • Anonymous
    August 02, 2004
    If I insert an image in the RichTextBox at runtime, can I drag/move it inside the RichTextBox with the help of mouse, just like we can move any control on the form during design time.
    Please guide

  • Anonymous
    August 02, 2004
    I am trying to make a customized PrintPreviewDialog using PrintPreviewControl. Can any one please explain how to change the

    cursor only on the document that is displayed in the Preview control? We can use the cursor property of the PrintPreviewControl,

    but that is not useful, as when you move in to the Preview control, the cursor changes even if you it is not on the document.
    Is there any way to get the document area, so that we can check "MouseClick" event?
    more over if two pages are displayed in the preview control, how to check which one is clicked?
    Please guide.

  • Anonymous
    August 02, 2004
    The comment has been removed

  • Anonymous
    August 02, 2004
    In the tree view control with check boxes at each node, if I uncheck the parent node how to gray-out all checked children corresponding to that node?
    Please guide

  • Anonymous
    August 05, 2004
    Why don't enums allow one to define methods (as well as other types of members) considering that they're just another ValueType like structs?

  • Anonymous
    August 09, 2004
    i am trying to fire an event in derived class.
    which is declared public in base class.
    this is a C# restruction ...
    why it is so.....?

  • Anonymous
    September 17, 2004
    C# Frequently Asked Questions : How to send a question ?

  • Anonymous
    October 14, 2006
    The comment has been removed

  • Anonymous
    January 22, 2010
    The comment has been removed

  • Anonymous
    July 08, 2010
    Hello, Anybody knows that how can I set the Linebreak settings after some fixed characters in Visual Studio IDE? As much I can find it just provides the word wrap when your code touches to the screen size, but I need it after some fix characters say 120 chars. So the scenario is that when your codeline has more than 120 characters in it it should automaticaly put a word wrap. Please help..... Thanks, Anruag Vishnoi,

  • Anonymous
    July 22, 2010
    The comment has been removed

  • Anonymous
    November 23, 2010
    i want to ask that whether vc++ based application is compatible with linux while it is created in WIndows XP??

  • Anonymous
    February 11, 2011
    i have two page 1st page... let it be adminfileupload page 2nd page... home page(this will be site home page) i have one folder in solution explorer named images. what i want to do is adminfileupload has one fileupload control and a button named update when any one browse image file with file upload and click the button(update) then the image should be viewed in home page and also saved in images folder. each time we chose a file and click the button(update) the image should be changed. and this image should be background image, i mean i also have to show some data from database over that image. working in c# asp.net

  • Anonymous
    March 03, 2011
    hi, I am working on asp.net C#.When i use visual studio 2010 web development server everythnig is working fine, but when i try to host my app on IIS server, the connectivity with the database is not properly maintained. e.g it says that the database is a read only database, whereas i m able to edit/insert whn i host the same app on web development server. I m using mssql server s database. my connection string is "Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\MyDatabase.mdf;Integrated Security=True;User Instance=True" plz help.

  • Anonymous
    March 25, 2011
    i have a administrator form and in this form lot of menu items and all opens a new form. but open a new from and when again i will open a new from then new form will be open but old will not be close.there many form open in administrator form. i wand when i open any form on click a menu item the other form should be close.

  • Anonymous
    October 03, 2011
    Hi.... My Question is Can some one Please explain me What is "Object Slicing" In Terms of C Sharp. Examples provided in certain makes no-sense to me.

  • Anonymous
    May 27, 2012
    hi, i am not able redirect to ip of a pc in LAN following ip is ip on which my switch is configured and want to access file on pc with ip 192.168.0.17 of LAN. application code: ClassClientServer obj = (ClassClientServer)Activator.GetObject(typeof(ClassClientServer), "tcp://169.254.97.165:4835/ClientServer"); i am getting following error. A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 169.254.97.165:4835 Thanks in advance.

  • Anonymous
    June 04, 2012
    what  "using System.Reflection"; is used for

  • Anonymous
    June 05, 2012
    how can i get access of a button which is inside a grid view and that grid view  inside of an another grid view.

  • Anonymous
    July 06, 2012
    Can anyone help me how to retrieve the below computer event statistics on a network, i.e. The exact time computer gets logged on, logged off, locked, unlocked, remote logged on etc, also the user name who is responsible for events.. Also this should work on windows OS(XP/Server/7). If this can be done through WMI, please let me know how... Thanks!

  • Anonymous
    July 24, 2012
    Hi All , PFB problem statement 2 Create a Console Application for solving the below mentioned problem statement. Target Date: 03 August 2012 Note: I received only 04 completion mails for problem statement 1 ! Problem Statement 2 Bajirao Singham has been promoted to a higher rank in in Goa Police after his extraordinary performance in the Jaykant Shikre case. Many police stations, apart from Shivgad will fall under his jurisdiction. To create a balance in capabilities, Bajirao Singham recruited a few policemen and shuffled them with existing ones. Bajirao Singham has a list of all policemen with their capabilities mentioned from all stations and requires your help in dividing them almost equally so that all police stations are almost equal to each other in their capabilities. Write a program finding the best way to divide all the policemen (except Bajirao Singham) almost equally for all the police stations to reach a result wherein all police stations are most closely equal to each other in terms of capabilities. Note: • The number of policemen in each station cannot vary more than 1 • The total capability of each police station (a sum of capabilities of all policemen in each station) should be nearly as equal as possible to each other. Input Specifications 3 arguments required NoOfPolice, NoOfStation, IndividualPoliceCapabilities[] where NoOfPolice is the  number of policemen reporting to Singham (1<=PoliceCount<=10000) NoOfStation - number of stations which are under Bajirao’s control (1<=StationCount<=1000) IndividualPoliceCapabilities[ is a an array specifying the Capabilities of each Policeman, for ith police the capability number would be 1<=i<=1000 Output Specifications Your function StationBalancedCapabilities should have the output variable 'output1' with the Total capability of each police station after balancing in ascending order Examples Sample 1: Input : 5:2:{10, 20, 90, 200, 100} Here 5 Policemen are reporting to Singham and should be balanced in 2 stations and  10, 20, 90, 200, 100 are the capabilities of the 5 Individual Policemen. Output : 210 210 Capabilty of each station is 210 Sample 2: Input : 10:2:{1, 1, 2, 1, 1, 1, 1, 1, 1, 6} Here 10 Policemen are reporting to Singham and should be balanced in 2 stations and  1, 1, 2, 1, 1, 1, 1, 1, 1, 6 are the capabilities of the 5 Individual Policemen. Output : 10 6 Capabilty of each station is 10 and 6

  • Anonymous
    August 12, 2012
    after complilation  and entering data the error occurs cannot convert aa to int . what is the reason and how to solve the problem

  • Anonymous
    September 22, 2012
    what will be the output of the following code #include<stdio.h> void main() {    int m=2;    printf("%d %d %d", ++m, ++m, ++m); } in turbo C it gives 432 but in other compilers it givses 222 so what will be the final answer

  • Anonymous
    October 03, 2012
    Hi, Simple question. I built a web service solution. Also, i have a cvs parser solution. I need to tie an exectuion of a pareser to a button on the webservice. These are two different solution. Can you please advise. Nemanja

  • Anonymous
    March 05, 2013
    Check out my Google Plus Account plus.google.com/116678955537279912497

  • Anonymous
    June 15, 2013
    how do i cluster a time series data. i have a list of items along with their values at different interval of time. to summarize the best and worst i have to divide them into clusters. is there an algorithm for it>

  • Anonymous
    July 12, 2013
    I have window form & microsoft excel as database. I want to implement searching feature. i have 1 textbox 1 datagridview & 1 button & want whenever i click on button a search should be made in excel file based on the id provided in textbox & its description should be displayed in gridview. The code i'm using is not dynamic its static i mean it'll only show description of data i provided in code & not in textbox ? Help me i urgently need this code ???? My Code is :- private void srch()        {            string strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= 'c:\Product Details.xlsx';Extended Properties='Excel 8.0;HDR=Yes;'";            // double id = Convert.ToDouble(textBox1.Text);            string query = "SELECT * FROM [Sheet1$]";            DataSet excelDataSet = new DataSet();            OleDbDataAdapter da = new OleDbDataAdapter(query, strConn);            da.Fill(excelDataSet);            dataGridView1.DataSource = excelDataSet.Tables[0];            DataView dv = ((DataTable)dataGridView1.DataSource).DefaultView;                        DataView dv_filter = new DataView();            dv_filter.Table = excelDataSet.Tables[0];                        dv_filter.RowFilter = "ID = '105'";            dataGridView1.DataSource = dv_filter;        }

  • Anonymous
    August 08, 2013
    can it is possible to save a string into a text file using savefiledialouge

  • Anonymous
    August 18, 2013
    I am making android game in unity it is a bout ball hit a wall then reflect to player and the player should press on right button(cube) of 4 button(cubes) ->(up,under,right,left) to reflect the ball to wall and if he press on wrong button the ball do not reflect and the player lose chance of 3 chances , and the player have 3 chances if he lose it the game stop so -i want c# script to make the ball reflect randomly in 4 position(up,under,right,left) and -other one to fixed if the player press on right button or no and -other one to make 3 chances and if he lose it the game stop please help me,and sorry to prolong regards

  • Anonymous
    August 29, 2013
    how to read macro texts from a word document ? i want to show those texts in a label the way it is printed in word document if anybody has any solution please provide me i got strucked in this coz of a client requirement

  • Anonymous
    March 16, 2014
    i am trying to implemet a stand alone application in c#.. i just want to use windows speech recognition macros in my c# code. how can i do it .  can anyone please help me...

  • Anonymous
    April 04, 2014
    I wish to know more on VB .Net framework, in real time what could be testing in VB .Net. What is end to end process in VB .Net development and testing? in banking environment?

  • Anonymous
    July 21, 2014
    The comment has been removed

  • Anonymous
    October 11, 2014
    I need hlp,write a c# program with the GiU using the textbox_textchanged event(double click on your textbox to get the textchanged stub method)get the text entered on to the textbox and the application should open a log file saved as texmtext in a folder called logs. Somebody plz hlp me out with this.thank you

  • Anonymous
    December 08, 2014
    The comment has been removed

  • Anonymous
    January 28, 2015
    Hi I want to make a windows service application for chat with delivery report please help me at least suggest me some thing to study

  • Anonymous
    February 23, 2015
    I am developing ASP.NET application wherein I have one feature to PRESS 2 BUTTONS 9one on left side and one on right side) on Web Application Screen USING “HAND GESTURE” (NOT the mouse control gesture) through the web cam of PC / Laptop (Any web cam). Kindly help me with the source of ASP.NET / .Net Libraries for Hand gesture and also let me know the source for the same.

  • Anonymous
    March 16, 2015
    I have aquestion.. How to write and run simple C# program without visual studio.. I have .Net framework 4.0.. please write simple steps....

  • Anonymous
    March 31, 2015
    c# Formda benim bir ödevim var ; bir buton 2 textbox ve 1 listbox olucak lisbox a 0-100 arası sayılar yazacam ama bu sayıların belirli bir sırası olacak mesela 4.sıradaki sayı 10, 10.sıradaki sayıda 4 olması lazım lütfen sınav sorusu acil yardım

  • Anonymous
    April 05, 2015
    The comment has been removed

  • Anonymous
    April 09, 2015
    Exception Error Incorrect syntax near 'System.Web.UI.WebControls.DataControlFieldCell'. how can I resolve my error <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" EnableModelValidation="True" Width="220px"  >            <Columns>                                <asp:BoundField DataField="QUESTION_NO" HeaderText="Q_NO" />                                <asp:BoundField DataField="QUESTION_DESCRIPTION" HeaderText="DESCRIPTION" />                <asp:TemplateField HeaderText="ANSWERS">                    <ItemTemplate>                        <asp:DropDownList ID="DropDownListUser" runat="server" AutoPostBack="False">                            <asp:ListItem Text="Yes" Value="True"></asp:ListItem>                            <asp:ListItem Text="No" Value="False"></asp:ListItem>                        </asp:DropDownList>                    </ItemTemplate>                </asp:TemplateField>            </Columns>        </asp:GridView> Hide   Copy Code string query;               for (int i = 0; i < GridView1.Rows.Count - 1; i++)               {                   query = "insert into student_info values('" + regtxtbox.Text + "','" + gentxtbox.Text + "','" + bactxtbox.Text + "','" + pretxtbox.Text + "','" + gratxtbox.Text + "','" + Unetxtbox.Text + "','" + agetxtbox.Text + "','" + cgptxtbox.Text + "','" + smetxtbox.Text + "','" + sestxtbox.Text + "','" + exptxtbox.Text + "','" + martxtbox.Text + "'.'" + GridView1.Rows[i].Cells[0].ToString() + "','" + GridView1.Rows[i].Cells[2].ToString() + "')";                   MessageBox.Show("SURVEY INFORMATION HAS BEEN STORED IN DATABASE");                   SqlCommand cmd = new SqlCommand(query, conobj);                   cmd.ExecuteNonQuery();               }

  • Anonymous
    May 07, 2015
    i am building my website,,, i want to play my local mp3 songs without using database or copy songs to the project folder... can anybody give me c# code to solve it plz ,, i want to use c# code to solve this problem as more as possible

  • Anonymous
    May 08, 2015
    I am unable to find Microsoft.VisualStudio.Threading.dll. I want to use this assembly in C# (VS 2013 & VS 2015) but can't find this. can someone help me where this assembly reside?

  • Anonymous
    June 06, 2015
    how can i retrive image in datagridview  from database c# with linq ?

  • Anonymous
    June 12, 2015
    how can i make many pictureboxes in a list? Im beginner please help me. This is a code of me but its not working.        List<PictureBox> PictureBox1 = new List<PictureBox>();        int counter = 0;        private void CreateDynamicButton()        {           PictureBox1[counter] = new PictureBox();           PictureBox1[counter].Height = 80;           PictureBox1[counter].Width = 80;           PictureBox1[counter].BackColor = Color.FromArgb(random.Next(255), random.Next(255), random.Next(255));           PictureBox1[counter].Location = new Point(random.Next(this.Width), random.Next(this.Height));           PictureBox1[counter].Name = "Button" + counter;           PictureBox1[counter].Font = new Font("Georgia", 16);           // zorgt ervoor dat ze binnen de panel spawnen.           Controls.Add(PictureBox1[counter]);        }

  • Anonymous
    June 24, 2015
    Hello! I'm trying to return a string to the WriteLine methods in my main funtion based on the code below. I need to create a new class called MyClass, through which I need to return the string values. Can anyone assist with this? Thanks! using System; namespace Proj03 {  class Program {    static void Main(string[] args) {      bool var1 = true;      int var2 = 3;      Console.WriteLine(new MyClass(var1));      Console.WriteLine(new MyClass(var2));      Console.WriteLine("Press any key to terminate.");      Console.ReadKey();    }//end main  }//end class Program }//end namespace The console output should be: Keith Haymond Press any key to terminate.