|
kevinnicol wrote: oops, thought I was in the C# forums, must have stumbled into the C++ forums by accident
The point is to answer in context of the OP's questions, and if you had taken the time you spent on your clever sarcasm and spent it on reading all the OP's posts instead, you'd know he was coming from an OO background from C++. So I think you need to decide if you want to help someone with a question in context, or if you want to show off your mad skilz
The OP said "I am wondering if that is a Microsoft's "invention" or a general OOP thinking. I never met it in C++." By way of my response to you, I was telling him that data grid data binding with properties is a Microsoft-specific invention for C#/.NET, and not general OOP thinking. I replied to your post to help him and the lurkers, not educate you.
But as a token of goodwill, I'm still willing to educate you. You misused "IE" in your previous post. You might want to look that one up.
|
|
|
|
|
There was no sarcasm intended, I just saw your reply in my email and truly thought I had made a reply in the wrong forum. There was no intent of sarcasm or showing of my "mad skilz". I will choose to take your token of goodwill as that and not passive aggression; in the future will use eg. instead of ie. in those cases. Thanks.
|
|
|
|
|
kevinnicol wrote: There was no sarcasm intended
Oh sorry, my bad! Since you already know about e.g., you're ahead of 90% of the people out there....
|
|
|
|
|
Everybody knows about exempli gratia and id est.
They are learned in elementary school.
|
|
|
|
|
ha ha yeah, right! If I only had a nickel for every time i.e. got misused.....
|
|
|
|
|
Because you can then provide validation code. But if you don't want to, then try an automatically-implemented property instead.
|
|
|
|
|
nstk wrote: As I know from OOP theory, the purpose of private Properties is to have the variables of an object protected from other classes, that could accidentaly change their value, thus provoking complications in a software. Am I correct till here?
Only partially. The other reason is to hide the implementation, so that it can change in the future. The calling code only needs to know the property name (or private function name). However you can change how you calculate the value.
So it's for future change, as well as current privacy. That's where the complication of properties comes in handy. Next month, you might rewrite your Category property to look like this
public int Category
{
get {
if (cat < 0) return 0;
else return cat;
}
set { cat = value; }
}
|
|
|
|
|
Hi,I'm a beginner,I'm learning develop windows forms applications,during these days I have developed several off-line programming.And I think that they are impracticability,so, I want to learn how to develop C/S programs like MSN or others,what should I do ? If you can recommend some books is the best.Thank you!
I'm a Chinese boy,my English is not good,this is my first time posting question on this forum.
If you can understand Chinese, Follow is in Chinese:
我是一名初学者,正在学习windows窗体程序开发,我也写了一些程序,但是都是单机程序,我想学习开发C/S架构的程序,需要学习哪些?就像MSN或者其他的软件,如果能推荐一些书籍的话更好,谢谢!
modified on Friday, December 17, 2010 1:40 AM
|
|
|
|
|
It looks like you are asking how to develop web based applications. If that is true then you should study ASP.NET[^], and I am sure there will be some books published in Chinese on the subject. You could also try asking your question in the Chinese Forum[^].
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Not ASP.NET,I want to learn "Client-Server Based" programming,for example:Issue Vision.
Should I learn TCP/IP、COM+、Web Services、remoting??? It's right?
|
|
|
|
|
I would suggest buying a book or search the internet for references on Client Server; this will give you more information and you can select the ones that fit your needs.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
For .NET you should consider WCF. I would do some internet searching for .NET client/server primers, or subscribe to an online book service like Safari Bookshelf so you can read any tech book you want as your questions and needs change.
|
|
|
|
|
Thank you.I just find <<professional c#="" 2008="">>,published by WROX.
|
|
|
|
|
It's a decent C# book, but I don't see a whole lot of C/S in there. Also, it will be 2011 in a few days so you probably want to be working with VS 2010?
|
|
|
|
|
I usually work with VS2005 or 2008.
|
|
|
|
|
Hide I'm going to develop a program like digital signage. I want to save some audio, video and image files in a databse and display it in ascheduled interval. Can anybody help me, How can I do this? Which technology I can use? Please help me.
Thanks in advance.
|
|
|
|
|
More information is required to even point you in the correct direction!
How are you going to deliver this, internal app or over the web?
What are your existing skills?
What do you mean by digital signage in reference to media files?
What database do you intend to use?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Its just a desktop application. I want to store the files in a folder and file references in a database. There will be a schedule table to store the file references and I want to show the saved files according to the schedule.
I,m basically a web programmer so I don't know much about the Windows methods.
Can you please help me on delivering the resources. I just want to play the saved files through any interface.
How can I show the media files and of course it should be displayed in multiple screens.
|
|
|
|
|
I am using the Directory.GetFiles to create an array of file names, then I am parsing through each one of those files and pulling a separate file name from inside the file text of which I would like to add into a new array of which I can reference later in my code.
Does anyone know how to do this? Thanks for reading.
|
|
|
|
|
|
I've never used list, do you happen to have a quick example while I start googling it?
|
|
|
|
|
To be a little more specific
I found this code, so far so good if it will work in a foreach loop.
[code]List<string> list = new List<string>();
list.Add(tXml);[/code]
how can I display this into a single message box?
|
|
|
|
|
Lol
Ok here is what I wrote, please critique, thank you for pointing me to list by the way.
<br />
<br />
List<string> list = new List<string>();<br />
<br />
foreach(string stringName in stringNames)<br />
{<br />
list.Add(tXml);<br />
}<br />
<br />
string[] list2 = list.ToArray();<br />
MessageBox.Show(messageBoxArrayToString(list2));<br />
<br />
<br />
private string messageBoxArrayToString(string[] toParse)<br />
{<br />
string arr = string.Empty;<br />
foreach (string i in toParse)<br />
{<br />
arr += i.ToString() + "\r\n";<br />
}<br />
<br />
return (arr.ToString());<br />
<br />
}<br />
<br />
<br />
modified on Friday, December 17, 2010 3:32 PM
|
|
|
|
|
turbosupramk3 wrote: foreach(string stringName in stringNames)
{
list.Add(tXml);
What is tXml ?
turbosupramk3 wrote: list.ToArray();
That seems needless.
turbosupramk3 wrote: messageBoxArrayToString(string[] toParse)
Take a look at System.String.Join<string>
turbosupramk3 wrote: string arr = string.Empty;
You don't need to initialize it.
turbosupramk3 wrote: i.ToString()
You don't need to use ToString()
turbosupramk3 wrote: [code]
Try using HTML.
|
|
|
|
|
Yes As PIEBLEDconsult suggested You can use List like.
Say your file is having a typr of string, so take List<String> .
for add the file List.Add("+FileName+");
and to make a Looping on that use,
foreach(string name in Filenames)
{
}
Hope it helps, write here for further query.
|
|
|
|