and wat bout getting the #region and #endregion Dave????
rameshbhojan
Posts
-
Using CodeDOM in .NET to AutoGenereate a constant member field -
Using CodeDOM in .NET to AutoGenereate a constant member fieldThe Code will change Giorgi During Runtime...... :-) its not static..... anyways i ve got my answer from Dave........ u can check the same...... Thanks, ramesh
-
Using CodeDOM in .NET to AutoGenereate a constant member fieldSorry Dave, i don know how to add a section of code here.... both my indented version and non-indented version look the same above!!!!:-( Sorry..... but i hope u got wat i wanted to say....... i want the statement inside the method to be indented to one more tab towards right
-
Using CodeDOM in .NET to AutoGenereate a constant member fieldThanks Dave for both of your answers :-) its all fine now........ hey Dave do you know how to creat regions using CodeDOM and i have one more issue..... all the statements inside a method or a constructor are aligned to the extreme left...... i want it to be properly indented. for example: public Data(string name, string age, string city) { this.m_name=name; this.m_age=age; this.m_city=city; } this i wat i am getting instead of getting a well indented code like: public Data(string name, string age, string city) { this.m_name=name; this.m_age=age; this.m_city=city; } How do i get it indented....
-
Using CodeDOM in .NET to generate an assignment statement inside a property of a classHi Gajatko, All i wanna generate is : public System.Int64 RollNumber { get { System.Int64 rollNo = (System.Int64 )this["@roll_number"]; return rollNo; } } i don need the set statement.... anyways gimme the solution you have...... if i am able to generate the way you said then also it is fine!!!! Thanks, Ramesh
-
Using CodeDOM in .NET to AutoGenereate a constant member fieldWell..... :-) i started with CodeDOM.... Actually i am creating a whole C# file which has a namespace.... a class.... its member fields.... methods..... properties.... i have been able to do a major part.... the places where i had issues.... are the ones i have posted.... :-) so i need a solution to tat using "MemberField" class in CodeDOM... hey Giorgi...... u din tell me how to do tat string manipulation stuff.... i mean if a wanna have " in my string... then how do i do tat???? -- modified at 7:51 Tuesday 21st August, 2007
-
Using CodeDOM in .NET to AutoGenereate a constant member fieldNo Giorgi.... m speakin of using CodeDOM to do tat... However, i would also like to know the solution for the problem you mentioned above.... i mean how do i have " inside my string usually in string manipulation???
-
Using CodeDOM in .NET to AutoGenereate a constant member fieldya .... tats wat i meant Giorgi.... as u mentioned i can build the code from string... in the content of tat string i want one such statement which i mentioned in my query above........ do u know how to do tat?????? Thanks, ramesh
-
Using CodeDOM in .NET to generate an assignment statement inside a property of a classCould anyone please help me out in auto-generating a property in a class in a following format: public System.Int64 RollNumber { get { System.Int64 rollNo = (System.Int64 )this["@roll_number"]; return rollNo; } } I am able to generate the property with the return statement and the other stuff, but i am not able to Generate the assignment statement i,e : System.Int64 rollNo = (System.Int64 )this["@roll_number"]; Please Help. Thanks, Ramesh
-
Using CodeDOM in .NET to AutoGenereate a constant member fieldHi All, I have used CodeDOM in .net to auto-generate C# code, which in essence generates a class file having a class along with its member fields, methods and properties. However, i don know how to generate the following line of code: private const string NAME = "CSharp"; Here, i have a generate a CodeMemberField which is a constant string with a private specifier as shown above. Please send me the sample code which would help me to auto-generate the above line of code. Thanks, Ramesh
-
Using CodeDOM in .NETHi All, Could anyone please help me out in auto-generating a property in a class in a following format: public System.Int64 RollNumber { get { System.Int64 rollNo = (System.Int64 )this["@roll_number"]; return rollNo; } } I am able to generate the property with the return statement and the other stuff, but i am not able to Generate the assignment statement i,e : System.Int64 rollNo = (System.Int64 )this["@roll_number"]; Please Help. Thanks, Ramesh
-
Auto-Generating a member field in a class using CodeDOM in .NETHi All, I have used CodeDOM in .net to auto-generate C# code, which in essence generates a class file having a class along with its member fields, methods and properties. However, i don know how to generate the following line of code: private const string NAME = "CSharp"; Here, i have a generate a CodeMemberField which is a constant string with a private specifier as shown above. Please send me the sample code which would help me to auto-generate the above line of code.
-
How to store the retrieved values from a coulmn of a table in an array??Thanks talal :-) Now if i wanna display all these values in the array(or datareader) in a dropdown list.... how do i do that???????
-
How to store the retrieved values from a coulmn of a table in an array??Could you please give me a sample code(using my example above) to do the same as u mentioned.......
-
How to store the retrieved values from a coulmn of a table in an array??Thanks Talal :-) Now how do i get these values from row and save in a array variable, which i need to pass as a parameter to a method???
-
Using CodeDOMFor Eg. If i have a class with a member field as follows: Private Const int ID=123; How to generate this using CodeDOM?
-
How to store the retrieved values from a coulmn of a table in an array??Hi All, PLease let me know if how can a save the values in a column from a database in an array using C# .NET Web Application (so that i could use each value in the array in my code one by one.) For Eg.: if i have the following query: SELECT Name FROM Details WHERE Country='India' here "Name" and "Country" are two columns in table called "Details". Suppose the query returns Three values: Ram, John and Sohail i want these names to be saved in an arraay. i could not use the "ExecuteScalar" class as it can save only one value into a variable! please send me the few lines of code necessary to do that using the above mentioned example. Thanks, Ramesh
-
Using CodeDOM in .NET -
Using CodeDOMHi All, Please let me know if how to use CodeDOM in .NET to autogenerate a Const member field with initialization.... ??? Thanks, Ramesh
-
Exception :"The configuration section for Logging cannot be found in the configuration source."Hi All, I was trying to use Enterprise Library 3.0 in my .NET application. While trying to use the Logging application block,after configuration,i got the following exception while calling the Logger.Write class: "The configuration section for Logging cannot be found in the configuration source." However, earlier while calling the LogEntry class, i was not having any issues. only while the logger class is called after the log entry, i am getting the exception. I have added the necessary references to my project and included the namespaces. Please help me solve the exception. Thanks, Ramesh