Ask a FAQ Question

Ask a FAQ Question

Rate This

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 for a listing of related resources.


Leave a Comment
  • Please add 3 and 2 and type the answer here:
  • Post
  • how can i get access of a button which is inside a grid view and that grid view  inside of an

    another grid view.

  • 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...


  • 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.


    • 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


    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

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

  • what will be the output of the following code


    void main()


       int m=2;

       printf("%d %d %d", ++m, ++m, ++m);


    in turbo C it gives


    but in other compilers it givses


    so what will be the final answer

  • 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.


  • Check out my Google Plus Account

  • 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>

  • 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);


               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;


  • can it is possible to save a string into a text file using savefiledialouge

  • 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


  • 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

  • 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...

  • 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?

  • how to get records while SQL query  execution time ?

Page 13 of 14 (208 items) «1011121314