|
Skynyrd wrote:
I cant seem to imagine any situation where a property isn't a viable solution
The issue is that I'm trying to create an OO solution in a way that doesn't use a property, so I can impliment a pattern without having to write a property, I can just add an attribute.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
|
How would that work ? I create an attribute, and it's called in the base class when the value changes, how ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
|
CG, I think your best choice is to simple use a property. That said, I would like to this you could perform some reflection magic along with the ILGenerator class to perform this (just a thought).
- Nick Parker My Blog | My Articles
|
|
|
|
|
Sounds interesting, do you have more info ? Yes, I could use a property, but as I said, I'm looking for another option.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I have a direct draw based application and i need to play in a part of the screen a macromedia flash(.swf) file.How can i do this? Is it possible?
i hoope someone can sand me some code...plz
plz send a response at :krutsch@gmail.com
13
|
|
|
|
|
take a look at COM Control Shockwave Flash Object.
U can add it to ur designer toolbox and put it anywhere in ur form as u would with any other control.
I think it will do what u need, but I dont have specific data on how to program against it. A quick google search should givue u info.
|
|
|
|
|
Hello,
I am developing a database application for a library system. I have teachers, students, and books. I have done programming in oop in C++/java. I know about classes, objects, heratance,multiple heritance and polymorpthom. But l am not sure how l could apply this to my database application in visual C#. I know that everything in C# is made up of classes and objects with the controls.
If l was to do this application in C++ or java, then my classes would be teacher, student, and book. Then the instance variable for the student would be things like IDNumber, Name, Address, phoneNo, and e-mail, etc. The instance methods would be addStudent, updateStudent, deleteStudent, etc.
But l am not sure how to apply this in Visual C++. Do developers in the real-world use classes and objects? Does anyone have a small example program that l could examine? Or is there any tutorals on the internet that shows you a step by step in developing a database application using classes and objects.
Thanks for your help,
Steve
|
|
|
|
|
steve_rm wrote:
But l am not sure how to apply this in Visual C++.
I assume you mean C#. These principles apply without change in C#. C# is virtually Java anyhow.
steve_rm wrote:
Do developers in the real-world use classes and objects?
I doubt there are many that don't use them every day.
steve_rm wrote:
Or is there any tutorals on the internet that shows you a step by step in developing a database application using classes and objects.
I'm sure there is, even here on CP. For starters, I tend to do all my data access through stored procedures, then I write a class full of static methods that call the procedures. That's my data layer, the rest of the code just calls it.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
U might want to take a look at DataSets and Schemas. It sounds like the editor's self generated strongly typed datasets based on ur DB schema would do you lots of good.
|
|
|
|
|
Here is what i have. I am creating an address book using C# and saving the info in an XML file. I wanna be able to write a last name in a text box and have the inforamtion about that contact to show up on the form( I don't wanna use a list box, just in case the list is long). I have been pulling my hair out with this for the past 2 weeks. I decided to give up and come here for help.
here is a sample of how things are stored in my XML file:
- <Contact ContactNumber="13">
<LastName>Lucio</FullName>
<FirstName>Brell</FirstName>
<PhoneNumber>222-222-2222</PhoneNumber>
<Email>brell@yahoo.com</Email>
<Street>2 two street</Street>
<City>twoCity</City>
<State>MD</State>
<ZipCode>22222</ZipCode>
<Country>USA</Country>
</Contact>
I guess the guess the ideal will be to have a process that will match the last name "Lucio" with the ContactNumber "13" when it is entered in the search textbox. And then have something to bring up the information stored in ContactNumber="13".
Well I just don't know how to code this part.
Any help would be greatly appriciated.
Thanks in Advance
McGrady
A NewBie in tha Block
|
|
|
|
|
The XML structure you have is very simple. Why don't you create an a schema based on that XML. From the schema you can create a typed dataset. Using XmlDataDocument you can brige XML and ADO.NET. You can utilize the power of the DataView and also use xpath!!
I'm in a hurry right now but I'll try to come back later with a helpful example.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
any onw know good program make the form more life than the standard form in visual studio .i mean if there is aprogram changes the buttoms tha main frame of the form to make it circulary or any shape except rectangle (i hate this view really)
thnx all;)
|
|
|
|
|
I'm a little bit of a hurry but i'll help u out...
- see Region property
- see TransparencyKey property
Not that you will have to handle moving the Form by ur self.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
thx 4 ur replay;);P but i wanna a software thats handle this topic
|
|
|
|
|
Has anyone seen this error?
My forms were loading properly in design mode but all of a sudden they don't. The only error I get is "Unspecified error" in the task list. No comments in the output.
The only way I can get it to work again is to exclude the form from the project and add it again. This fixes it all the time.
It's quite annoying and would love to know if there is a fix. I am using VS .Net 2003.
Thanks.
|
|
|
|
|
Hi,
I have an application that works with SQL for database.
Inside the application, I have a datagrid that shows the necessary information that I wanted.
The amount data I have is 100,000 records.
And I am trying to improve the performance when user opening the datagrid.
This is the big picture of what I've got.
When the form is being loaded, I create a thread with normal priority, and then load the all the database to the dataset.
From that dataset, I used dataview to view the data into datagrid, since I am doing search or filter based on user input.
The database table it self doesn't have so many columns, total there are 15 columns, and I only retreive 6 of them.
Is there anyway I could improve the performace of this process, when the user open the form or datagrid?
Thank you very much in advance
|
|
|
|
|
Maybe u shouldn't be loading all 100,000 records into ur dataset and filtering from there.
Howbout using the user input to generate a SqlCommand and fetching only the data the user wnats from the sql database?
The downside to this is that it will create a connection to ur DB everytime the user specifies some new filtering criteria, but the cost of loading and having in memory 100,000 records of which maybe only 1% are relevant to the user is a much higher price to pay.
|
|
|
|
|
Hi...
I have some values, like 0x800, 0x985 and 0x5FGH!
i have made a code that looks like this...
private const int WHATEVER = 0x800;
private const int SOMETHING = 0x985;
private const int PEPSI = 0x5FGH;
But if I want to add them to one 'const int'!
I have thought of doing this...
private const int[] ALL = {0x800, 0x985, 0x5FGH};
but that does not work
Can anyone tell me if it this is possible, and how to do it the right way..?
Thanks...!
QzRz
|
|
|
|
|
Try:
private readonly int[] ALL = {0x800, 0x985, 0x5F};
And, by the way, 0x5FGH is not a valid hex number.
Do you want to know more?
|
|
|
|
|
Thanks...!
That solved anothor problem...
so thanks again...!
QzRz
|
|
|
|
|
well thats not really the same thing..
when applying readonly to an array in c# , you are only guarranteed that no one assigns a new array to your variable , there is nothing thats stops you from changing the values in the array..
eg:
private readonly int[] ALL = {0x800, 0x985, 0x5F};
..
..
..
All=new int[] {1,2,3,4}; // wont work
All[0]=666; //<-- will work !!!
//Roger
|
|
|
|
|
|
The answer is, if u want 4 ints to be constant, then declare all 4 ints seperately as const.
Another option, is to create an enum with all const variables as its members. Thayt would ensure the readonly property of all the variables.
private enum Constants:int
{
WHATEVER = 0x0001,
SOMETHING = 0x0003,
PEPSI = 0x0005
}
|
|
|
|