hello friends, I have an one console application w.r.t delegates but while executing am facing 2 errors, here is the code . . using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Delegates { delegate string StrMod(string str); class DelegateTest { // replace spaces with hypens static string ReplacesSpaces(string s) { Console.WriteLine("raplacing spaces with hypens."); return s.Replace(' ','-'); } //reomve spaces static string RemoveSpaces(string s) { string temp=""; int i; Console.WriteLine("Removing spaces."); for(i=0;i=0) { temp=temp+s[i]; } return temp; } } static void Main(string[] args) { // construct a delegate StrMod strOp = new StrMod(ReplacesSpaces); string str; //call method through delegate str = strOp("This is a test."); Console.WriteLine("Resulting string:" + str); Console.WriteLine(); strOp = new StrMod(RemoveSpaces); str = strOp("This is a test."); Console.WriteLine("Resulting string:" + str); Console.WriteLine(); strOp = new StrMod(Reverse); str = strOp("This is a test."); Console.WriteLine("Resulting string:" + str); Console.WriteLine(); } } } error: Error 1 'Delegates.DelegateTest.RemoveSpaces(string)': not all code paths return a value C:\Users\Praveen\Documents\Visual Studio 2008\Projects\Delegates\Delegates\Program.cs 20 23 Delegates Error 2 Cannot implicitly convert type 'int' to 'bool' C:\Users\Praveen\Documents\Visual Studio 2008\Projects\Delegates\Delegates\Program.cs 43 21 Delegates A
praveengb
Posts
-
Console Application based on delegates -
Fetching of data w.r.t the time limits in Sql Server2000sir this project is running from past 1 year where we can fetch date and time wise report through crystal report but now the task is to fetch using time frame like 6hrs or 24hrs...
-
Fetching of data w.r.t the time limits in Sql Server2000hello friends., here I have an query which needs to pick up the complaint number which was not solved within the time frame like 6hours from the time that complaint was registered, and here i have 4coloumns saying compdate,comptime,forwardeddate,forwardedtime which are of nvarchar data type in the table urbrur means urban rural. So for this from the net i found one query i.e, "select compno from urbrur where forwardedtime>DATEADD(hour,6,@time)"; for that @time they used some fixed date time like Set @Time='09/16/2011 10:00:00' but here i can't use it because as in my table the date and time are in separate columns having datatype i.e, nvarchar and I don't want this type of fixed values, it should take the values from the date n time columns in the database . . So friends i think i gave an complete descrption to my query so kindly do concerned to my problem and give favorable reply . . I'm very thankful to u all, praveen
-
How to attach mdf file to Crystal Report in VS2008hello friend, can u give the steps to create the instance and connecting to the crystal report . .
-
How to attach mdf file to Crystal Report in VS2008I'm unable to attach the mdf file i.e, when i select 'DataBase Files from Create new connection that from the Report creation Wizard' i'll get an error in the 'Crystal Report ActiveX Designer' window that "failed load database information". plz do concerned to this problem . . . . Thanks, praveen