For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
First, I have a button that calls 2 functions. First function (calculateMedieSim()) makes an operation with two number and the second one (selectData()) selects data from tabel. totalsim = 15 and totalsimyes = 8. The result should be 53,3 but it shows 0 Why?
I want to insert an image in database. But if I don't choose any image, I receive : Empty path name is not legal. In database, image field is BLOB and is null. Where is my mistake cause I can't figure it out..I think that I should verify if textBox5 is null and if is, imageBt=null. I tried this but it didn't worked. This is the code that I'm using to insert the image:
byte imageBt = null;
FileStream fstream = new FileStream(this.textBox5.Text, FileMode.Open, FileAccess.Read);
BinaryReader br = new BinaryReader(fstream);
imageBt = br.ReadBytes((int)fstream.Length);
SQLiteCommand com = new SQLiteCommand("insert into questions(image) values(@IMG)", Conexiune.getConnection());
com.Parameters.Add(new SQLiteParameter("@IMG", imageBt));
What are the specific rules to name a C# source file? I came across many posts about this issue but all are about special cases. For example, Microsoft's page about this topic does not really get to the point.
I need clear and to-the-point answers. Is a C# source file name arbitrary? I am using code samples from several C# books and the samples tend to pick up the name of the top (non-nested) class in the file or the name of namespace, or maybe something else. I have not tried to play with this yet but my feeling is that the file name could be just arbitrary. Is it correct? What are the imposed restrictions on file name and what are the actual guidelines?
Unlike Java, source files can contain more than one top-level public class declaration, and the file name does not need to match any of the classes' names.
So you wouldn't violate an official naming rule by naming your files what you deem most appropriate. Normally they should contain only one class and have the same name as that class because that's what's most intuitive.
In my opinion, it sometimes makes sense to have more than one class in a source file. In that case I would name the file like the class that is either the base class or represents the functionality that is most important within that source file. In some cases, e.g. lots of small classes that serve a very similar purpose, I put them all in a single source file and name it according to the purpose of those classes. But it should remain the exception from the rule.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
Last Visit: 31-Dec-99 19:00 Last Update: 21-Apr-15 9:40