1
Answer

C# working with sql server 2008 r2

scampercat

scampercat

12y
1.2k
1
I have a C#.net 2010 web form application that I need to add two tables to the database. This application uses linq to sql. Can you tell me if I want to add these two new tables to the sql server 2008 r2 database, do I

1. Need to remove the original .dbml file and recreate the .dbml file?

2. I would think I can just add two tables to the database and somehow refresh the existing .dbml file. If this possible?

Whatever your answer is to the question, can you tell me how to solve this problem?
Answers (1)
0
Vulpes

Vulpes

NA 98.3k 1.5m 12y
Use:

string[] items = fileName.Split('_');

items[0] will be the portion to the first _ and then items[1] will be the portion from the first _ to the second _.

These will exclude the underscores themselves.


Accepted
0
Vulpes

Vulpes

NA 98.3k 1.5m 12y
You could deal with that situation (or even two hyphen delimiters) by replacing this line:

   string[] items = fileName.Split('_');

with this:

   string[] items = fileName.Split(new char[]{'_', '-'});