Click here to Skip to main content
15,887,477 members
Home / Discussions / C#
   

C#

 
GeneralRe: >'True'> is not satisfying Pin
GrooverFromHolland15-Jun-12 12:30
GrooverFromHolland15-Jun-12 12:30 
GeneralRe: >'True'> is not satisfying Pin
Bernhard Hiller17-Jun-12 22:09
Bernhard Hiller17-Jun-12 22:09 
GeneralRe: >'True'> is not satisfying Pin
AstroBod42726-Jun-12 2:00
AstroBod42726-Jun-12 2:00 
GeneralRe: >'True'> is not satisfying Pin
AstroBod42726-Jun-12 1:58
AstroBod42726-Jun-12 1:58 
QuestionHow to implement error tracing for windows in c# application Pin
Member 385772214-Jun-12 22:34
Member 385772214-Jun-12 22:34 
AnswerRe: How to implement error tracing for windows in c# application Pin
Abhinav S15-Jun-12 20:28
Abhinav S15-Jun-12 20:28 
QuestionConsole Application based on delegates Pin
praveengb14-Jun-12 20:15
praveengb14-Jun-12 20:15 
AnswerRe: Console Application based on delegates Pin
Sandeep Mewara14-Jun-12 20:42
mveSandeep Mewara14-Jun-12 20:42 
praveengb wrote:
Error      1      'Delegates.DelegateTest.RemoveSpaces(string)': not all code paths return a value

C#
//reomve spaces
            static string RemoveSpaces(string s)
            {
                  string temp="";
                  int i;
                  Console.WriteLine("Removing spaces.");
                  for(i=0;i<s.Length;i++)
                  {
                        if (s[i] != ' ')
                        {
                              temp = temp + s[i];
                              return temp;
                        }
                  }
            }

This method does not return anything if the if-case is never true. This leads to 'not every possible scenario' is returning a string as expected. Add a return statement after 'for' ends to correct it. If nothing else, return an empty string.


praveengb wrote:
Error      2      Cannot implicitly convert type 'int' to 'bool'

Your checking condition in for loop here:
for (j = 0; i = s.Length - 1; i--, j++) //Incorrect

It should be a boolean true-false condition. Try:
C#
i <= s.Length -1


QuestionC# Installer Pin
Zeyad Jalil14-Jun-12 19:42
professionalZeyad Jalil14-Jun-12 19:42 
AnswerRe: C# Installer Pin
Sandeep Mewara14-Jun-12 20:35
mveSandeep Mewara14-Jun-12 20:35 
GeneralRe: C# Installer Pin
Zeyad Jalil14-Jun-12 20:48
professionalZeyad Jalil14-Jun-12 20:48 
GeneralRe: C# Installer Pin
Sandeep Mewara14-Jun-12 20:54
mveSandeep Mewara14-Jun-12 20:54 
AnswerRe: C# Installer Pin
Dave Kreskowiak15-Jun-12 2:03
mveDave Kreskowiak15-Jun-12 2:03 
AnswerRe: C# Installer Pin
Abhinav S15-Jun-12 20:26
Abhinav S15-Jun-12 20:26 
QuestionRunning a program as an Administrator Pin
MAW3014-Jun-12 16:24
MAW3014-Jun-12 16:24 
AnswerRe: Running a program as an Administrator Pin
Philippe Mori14-Jun-12 16:47
Philippe Mori14-Jun-12 16:47 
AnswerRe: Running a program as an Administrator Pin
Luc Pattyn14-Jun-12 17:54
sitebuilderLuc Pattyn14-Jun-12 17:54 
AnswerRe: Running a program as an Administrator Pin
Bernhard Hiller14-Jun-12 21:44
Bernhard Hiller14-Jun-12 21:44 
AnswerRe: Running a program as an Administrator Pin
DaveyM6915-Jun-12 0:28
professionalDaveyM6915-Jun-12 0:28 
Questionhow can i make double right click for button C# Pin
Member 401482414-Jun-12 9:40
Member 401482414-Jun-12 9:40 
SuggestionRe: how can i make double right click for button C# Pin
Sandeep Mewara14-Jun-12 10:50
mveSandeep Mewara14-Jun-12 10:50 
GeneralRe: how can i make double right click for button C# Pin
Wes Aday14-Jun-12 11:23
professionalWes Aday14-Jun-12 11:23 
AnswerRe: how can i make double right click for button C# Pin
PIEBALDconsult14-Jun-12 18:48
mvePIEBALDconsult14-Jun-12 18:48 
QuestionCOM/OLE: VB2010 code working - Similar C#2010 code not working? Pin
ToBick14-Jun-12 2:32
ToBick14-Jun-12 2:32 
AnswerRe: COM/OLE: VB2010 code working - Similar C#2010 code not working? Pin
Pete O'Hanlon14-Jun-12 3:03
mvePete O'Hanlon14-Jun-12 3:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.